BNetEx
BlitzMax Forums/BlitzMax Programming/BNetEx
| ||
I'm working on a server for a chat-like program, and I need to make/find some sort of WaitMessages function (think of waitevent), so that the server and client don't use up 100% CPU.. Problem is, I don't wanna just stick a delay command in the loop where it checks for messages, I want it to respond right as it receives a message without using all the CPU, has anyone written this yet, or can someone put me on the right tracks? EDIT: I guess it would have to wait for new clients as well, otherwise it would get stuck waiting for a message when someone is trying to connect. |