Posted: Thu Feb 12, 2009 5:58 pm
I still suspect the problem with your code is that you have a Delay(1) somewhere that triggers even if NetworkServerEvent() or WindowEvent() returns something else than 0. Removing that should fix the performance problem. (Or you may have a delay in the sending code, though that should be more obvious to spot.)
Alternatively, it may be easier and more reliable to put the networking code in a thread. That way there may be less clutter. In my opinion all network code should go in a thread because if it takes longer than normal (may happen on network failures) the user interface won't hang.
Alternatively, it may be easier and more reliable to put the networking code in a thread. That way there may be less clutter. In my opinion all network code should go in a thread because if it takes longer than normal (may happen on network failures) the user interface won't hang.