Timeline for Creating A UDP Game Server
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 6, 2020 at 20:39 | comment | added | Philipp | @ADuckWhat That depends on the implementation of your network API. Some APIs have a very generous input buffer, so not accepting messages for a while won't be an issue because they will all be kept for later. But I also had to work with APIs which would just start to drop messages when you didn't poll them frequently enough. Some network APIs actually abstract the network thread away for you and only give you an interface to poll the message queue they provide to you. This design allows you to write your own code single-threaded. | |
| Feb 6, 2020 at 20:33 | comment | added | ADuckWhat | Thanks. I also have a few additional questions. First, is should the network listening thread continue to listen even though the message queue is blocked(discarding packets when being processed in update loop), thus always listening? Could this current design be viable in a single thread? From many examples I have seen they have put a while loop to receive packets inside the same function as the update loop. | |
| Feb 6, 2020 at 20:22 | vote | accept | ADuckWhat | ||
| Jan 22, 2020 at 12:04 | history | edited | Philipp | CC BY-SA 4.0 |
added 7 characters in body
|
| Jan 22, 2020 at 11:10 | history | answered | Philipp | CC BY-SA 4.0 |