Issue with other client raknet library
Opened this issue · 0 comments
Currently I am trying to connect my rust app with the rak-rs
libary to the elixir-raknet
server. After many errors in the beginning I figured out that the versions have to match up and instructed rak-rs to use version 6 as stated in the source of elixir raknet. Now the server is failing on parsing the binary and tried to debug from client steps what might happen.
[debug] Open a new connection to {127, 0, 0, 1}:40008
[debug] Received open connection request 1 from {{127, 0, 0, 1}, 40008}
[debug] Sent open connection reply 1 to {{127, 0, 0, 1}, 40008}
[debug] Received open connection request 2 from {{127, 0, 0, 1}, 40008}
[debug] Sent open connection reply 2 to {{127, 0, 0, 1}, 40008}
[error] %MatchError{term: <<0, 0, 0, 0, 101, 173, 65, 44, 0>>}
[error] Failed to parse data_packet_4 (28 bytes) <<1, 0, 0, 64, 0, 144, 1, 0, 0, 9, 252, 206, 208, 100, 208, 91, 195, 159, 0, 0, 0, 0, 101, 173, 65, 44, 0>>
[rakrs] DBG! [CLIENT] Attempting to connect to address: 127.0.0.1:12345
[rakrs] DBG! [CLIENT] Waiting for pong packet...
[rakrs] DBG! [CLIENT] Recieved pong packet!
[rakrs] DBG! [CLIENT] Starting connection handshake
[rakrs] DBG! [CLIENT] Sending OpenConnectRequest to server...
[rakrs] DBG! [CLIENT] Received OpenConnectReply from server!
[rakrs] DBG! [CLIENT] Discovered MTU size: 1386
[rakrs] DBG! [CLIENT] Sending SessionInfoRequest to server...
[rakrs] DBG! [CLIENT] Received SessionInfoReply from server!
[rakrs] DBG! [CLIENT] Sent ConnectionRequest to server!
First confusing thing is that the server responds with the MTU size of 1386 since the client uses the own set default of 1400. So somewhere seems to get something lost. So I manually set the MTU on the client side to 1386 and apparently it got reduced by 14 bytes again to 1372 and so on. I do not know if this is intended.
I couldn't find any discrepancies in the lines of code on either side.
I was wondering how you implemented the protocol on xplane client side and maybe someone would feel comfortable to debug this thing through discord and see if there is an error on rak-rs or elixir-raknet side of the protocol and improve either side?
Best
Denny