[2005] Flushing buffer on synchronous sockets?
Is it possible to flush the buffer of a synchronous socket? I have a problem because of a design "issue" in the TCPClient, where the programmer made it to expect 3 different commands, but just the last of them reply.
The problem is that since the sending buffer isn't full the first message concatenates with the second, and the last part of the second with the last one.
I've tried reducing SendingBuffer, SendingTimeout, setting to True NoDelay... and had no luck.
I know I could do this with a asynchronous socket, but it's a shame having to reprogram a lot of the server part just because a "fault" by another person.
Re: [2005] Flushing buffer on synchronous sockets?
Hi !
I think that the only way to flush the buffer is to Disconnect the Socket.
or the read it till it empty. :sick:
Zak
Re: [2005] Flushing buffer on synchronous sockets?
While I can get some other way for doing it (or rewrite the listener...) I've made the thread where the socket is listening to sleep a few milliseconds between one of the messages...
Not a very stylish way of solving the problem...