Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
railgun-routing-client
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-client
Commits
9b5424cc
"...Irrlicht/svn:/svn.code.sf.net/p/irrlicht/code/trunk@1613" did not exist on "009e6d440caef9129ea6239fbfa20baea1faebe7"
Commit
9b5424cc
authored
Jan 07, 2026
by
nanamicat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean
parent
fa6de2cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
12 deletions
+2
-12
src/main.rs
src/main.rs
+1
-1
src/router.rs
src/router.rs
+1
-10
src/server.rs
src/server.rs
+0
-1
No files found.
src/main.rs
View file @
9b5424cc
...
@@ -41,6 +41,7 @@ async fn main() -> anyhow::Result<()> {
...
@@ -41,6 +41,7 @@ async fn main() -> anyhow::Result<()> {
);
);
let
socket
=
UdpSocket
::
bind
(
config
.bind
)
.await
?
;
let
socket
=
UdpSocket
::
bind
(
config
.bind
)
.await
?
;
tracing
::
info!
(
"Listening on {}"
,
config
.bind
);
let
mut
timer
=
time
::
interval
(
INTERVAL
);
let
mut
timer
=
time
::
interval
(
INTERVAL
);
let
mut
buf
=
[
0
;
1500
];
let
mut
buf
=
[
0
;
1500
];
...
@@ -56,7 +57,6 @@ async fn main() -> anyhow::Result<()> {
...
@@ -56,7 +57,6 @@ async fn main() -> anyhow::Result<()> {
result
=
socket
.recv_from
(
&
mut
buf
)
=>
{
result
=
socket
.recv_from
(
&
mut
buf
)
=>
{
let
(
len
,
addr
)
=
result
?
;
let
(
len
,
addr
)
=
result
?
;
tracing
::
info!
(
"{:?} {:?}"
,
addr
,
server_addr
);
if
addr
.port
()
==
config
.bind
.port
()
if
addr
.port
()
==
config
.bind
.port
()
&&
let
Some
(
peer
)
=
Router
::
get
(
&
mut
routers
,
addr
)
&&
let
Some
(
peer
)
=
Router
::
get
(
&
mut
routers
,
addr
)
&&
let
Ok
((
hello
,
_
))
=
bincode
::
decode_from_slice
(
&
buf
[
..
len
],
bincode
::
config
::
standard
())
&&
let
Ok
((
hello
,
_
))
=
bincode
::
decode_from_slice
(
&
buf
[
..
len
],
bincode
::
config
::
standard
())
...
...
src/router.rs
View file @
9b5424cc
...
@@ -64,16 +64,7 @@ impl Router {
...
@@ -64,16 +64,7 @@ impl Router {
}
}
}
}
let
now_ms
=
SystemTime
::
now
()
.duration_since
(
SystemTime
::
UNIX_EPOCH
)
.unwrap
()
.as_millis
()
as
u32
;
let
delay
=
(
SystemTime
::
now
()
.duration_since
(
SystemTime
::
UNIX_EPOCH
)
.unwrap
()
.as_millis
()
as
u32
)
.wrapping_sub
(
data
.time
)
as
i32
;
tracing
::
info!
(
"[{:?}] on_message: remote_time (packet)={} local_time (now)={} raw_diff (now-remote)={} delta={}"
,
self
.link_address
,
data
.time
,
now_ms
,
now_ms
.wrapping_sub
(
data
.time
)
as
i32
,
delta
);
let
delay
=
now_ms
.wrapping_sub
(
data
.time
)
as
i32
;
self
.delay
=
delay
;
//+= (delay - self.delay) / 4;
self
.delay
=
delay
;
//+= (delay - self.delay) / 4;
...
...
src/server.rs
View file @
9b5424cc
...
@@ -38,7 +38,6 @@ impl Server {
...
@@ -38,7 +38,6 @@ impl Server {
config
:
&
Settings
,
// routers: &mut HashMap<u8, Router>,
config
:
&
Settings
,
// routers: &mut HashMap<u8, Router>,
// self_peer: &Hello,
// self_peer: &Hello,
)
->
Option
<
Uplink
>
{
)
->
Option
<
Uplink
>
{
tracing
::
info!
(
"server message {:?}, version = {}"
,
message
,
message
.version
);
if
message
.ack
!=
self
.version
{
if
message
.ack
!=
self
.version
{
return
None
;
return
None
;
}
}
...
...
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