No, I think you were right... If you call send, then do something, and the message pump doesn't get called, then you should not receive anything until when the message pump does get called. For example, it should be fine for me to do: WSocket1.SendStr("HELO"); State:=stWaitingForHeloResponse; Etc.
When I receive the reply to HELO that state should be set, because nothing could call the message pump. I think you have a bug somewhere if you are getting the response before. Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hoby Smith Sent: 31 July 2006 15:37 To: twsocket@elists.org Subject: Re: [twsocket] Very strange problem with server and client software[thanks]... Hello. Just wanted to say thanks for the great input over the weekend! I will consider the input. Francois, you are right, that particular part of the initial handshaking exchange probably is a flaw in the implementation, although it is a requirement in the protocol design. In the protocol design, it is not possible to prepare the CHANNEL before sending the packet, as modifying the channel parameters before the Client is ready will result in a garbled reception by the Client. The packet buffering to prepare the packet before re-syncing the channel works fine. That is the only place in the protocol design where that is a weakness. Every other packet exchange is basically non-modal and can occur in any random or unpredictable order. I guess I assumed that because I was not RECEIVING multi-threaded, or calling any message processing loops, or implementing any custom message pumps, that I wouldn't experience a sequencing issue of that nature. Obviously, I was wrong. :-) Thanks again. Hoby -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be