Original Post
Hi gang,
I have a working server (IOCP) and client (asynchronous sockets) system that is working well. I can run the server and client on my machine and everything works fine.
In many instances, though, when the client is run on a remote machine, there are problems. Inevitably, these problems are related to lag, and the fact that stale packets are arriving and screwing things up.
For instance:
Client sends news request packet
No response from server for > 1 second
Client sends news request packet
Server (belatedly) gets first request and sends out news packet
Client gets news packet and displays. Moves on to the next task.
Server gets the second news request and sends out news packet
Client gets news packet again. Because it has already moved on, this can sometimes cause the program to go wonky.
Now, I''m catching these sorts of things as I get reports about them, one by one. They''re not hard to fix, but there are so many ways for this sort of thing to happen, I need a better solution.
So, is there any way to simulate a lag effect so I can see these problems first hand before they go out to testers? I can think of one or two possibilities, but they require some pretty serious modifications to the server and client systems. It would be nice if I could turn on and off the simulated lag easily.
Any advice?
-Ron