This is very useful if we run the network polling/pushing in non-main thread. This makes the engine sends and receives the packets as soon as posible.
This can be done by adding timeout to netcode_server_update and netcode_client_update.
If the timeout is zero, two update functions run non-blocking and otherwise.
Hi, it's me again.
I discovered that in ENet, the function
enet_host_service
which takes the last argumenttimeout
to wait for the next incoming packets. https://github.com/lsalzman/enet/blob/master/protocol.c#L1788 AFAIK, it usesselect
function.This is very useful if we run the network polling/pushing in non-main thread. This makes the engine sends and receives the packets as soon as posible.
This can be done by adding
timeout
tonetcode_server_update
andnetcode_client_update
. If the timeout is zero, twoupdate
functions run non-blocking and otherwise.Thanks for considering.