TimonPost / laminar

A simple semi-reliable UDP protocol for multiplayer games
821 stars 66 forks source link

First message in client_server example never receives a response from server #275

Closed joseluis closed 4 years ago

joseluis commented 4 years ago

Hi, I want to know if this is a bug or expected behavior.

The first message from the client to the server en the client_sever example never gets a response. Only the second message and the next ones.

E.g. starting the server and then the client:

➜ cargo run --example server_client
    Finished dev [unoptimized + debuginfo] target(s) in 1.16s
     Running `target/debug/examples/server_client`
Please type in `server` or `client`.
s
Starting server..
Received "msg1" from V4(127.0.0.1)
Received "msg2" from V4(127.0.0.1)
Client timed out: 127.0.0.1:12352
$ cargo run --example server_client 
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/examples/server_client`
Please type in `server` or `client`.
c
Starting client..
Connected on 127.0.0.1:12352
Type a message and press Enter to send. Send `Bye!` to quit.
msg1
Silence..
msg2
Server sent: Copy that!
TimonPost commented 4 years ago

Hi, do you have any sample code?

TheRadioGuy commented 4 years ago

@TimonPost There's code in #273

joseluis commented 4 years ago

@TimonPost Do you want a different code from the server_client example?.

joseluis commented 4 years ago

This is fixed now, probably in #280