|
-
Jul 11th, 2007, 09:51 AM
#1
Thread Starter
Addicted Member
[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.
-
Jul 11th, 2007, 10:27 AM
#2
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.
Zak
-
Jul 12th, 2007, 01:58 AM
#3
Thread Starter
Addicted Member
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|