Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
railgun-routing-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
railgun-routing-server
Commits
e1fa6f57
Commit
e1fa6f57
authored
Aug 27, 2022
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6cfdb64d
Pipeline
#16054
failed with stages
in 1 minute and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
server/src/main.ts
server/src/main.ts
+3
-4
No files found.
server/src/main.ts
View file @
e1fa6f57
...
...
@@ -7,11 +7,11 @@ import { api } from './Api';
import
express
from
'
express
'
;
import
path
from
'
path
'
;
// http
const
app
=
express
();
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'
public
'
)));
app
.
use
(
'
/
'
,
api
);
app
.
listen
(
config
.
port
);
// udp routing protocol
const
socket
=
dgram
...
...
@@ -20,17 +20,16 @@ const socket = dgram
const
address
=
socket
.
address
();
console
.
log
(
`listening
${
address
.
address
}
:
${
address
.
port
}
`
);
})
.
on
(
'
message
'
,
function
(
message
,
rinfo
)
{
.
on
(
'
message
'
,
function
(
message
,
rinfo
)
{
try
{
const
hello
:
UploadMessage
=
JSON
.
parse
(
message
.
toString
());
assert
(
hello
.
id
);
const
router
:
Router
=
Router
.
all
.
find
(
r
=>
r
.
id
===
hello
.
id
)
!
;
const
router
:
Router
=
Router
.
all
.
find
(
(
r
)
=>
r
.
id
===
hello
.
id
)
!
;
assert
(
router
);
router
.
rinfo
=
rinfo
;
router
.
onMessage
(
hello
);
}
catch
(
e
)
{
console
.
warn
(
e
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment