0
\$\begingroup\$

I have been trying to use the low-level API for UNET and the focus of this problem is this: NetworkEventType recData = NetworkTransport.Receive(out recHostId, out connectionId, out channelId, recBuffer, bufferSize, out dataSize, out error); This line is supposed to take in information from many different clients and sits within Update() function. I haven't actually started coding anything in yet... But the point is, if the clients are all transmitting data to the server at a rate equivalent to Update() then this line of code will not be able to (I think?) receive all of them at once (10+ clients vs 1 server). So is there a way to not lose any of the incoming data and process them accordingly?

\$\endgroup\$
  • \$\begingroup\$ Have you considered a while loop to keep checking until there are no more events to process? (Up to some maximum to avoid live-locking it) \$\endgroup\$ – DMGregory Jun 12 at 19:20
  • \$\begingroup\$ oh no actually I didn't think of that, nice one! \$\endgroup\$ – Parsa Rahimi Jun 12 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.