Hard to say without seeing your code, but I'm guessing posting the relevant parts from the client and server might not be possible or might be too long and hard to follow, but post whatever you can and I'll see if there is anything I can spot (I'm no expert though). Are you using multiple threads to send/receive data on the client or server (or both)