Skip to content

Commit

Permalink
Send Connection packet and write note about why
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Apr 12, 2024
1 parent 895f0f6 commit deba219
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/rlviser_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ impl RLViserSocketHandler {
// We now don't want to wait for anything UDP so set to non-blocking
socket.set_nonblocking(true)?;

// notify rlviser that we're connected
// it will send us info on the desired game speed / if the game should be paused
// if you choose to ignore this, at least send the right game speed / paused state back
// otherwise things like packet interpolation will be off
socket.send_to(&[UdpPacketTypes::Connection as u8], rlviser_addr)?;

Ok(Self {
socket,
rlviser_addr,
Expand Down

0 comments on commit deba219

Please sign in to comment.