info2004 wrote: > Hi, > > I am currently using the OnDataSent event of TWSocket to signal my > state machine to move on. This is working mostly, however, sometimes, > the event does not happen. > > Now, at the far side, the server being connected to closes the > connection when > it has it's data, so I am thinking that this close will sometimes > mask the OnDataSent.
When the server closes the connection OnSessionClosed triggers. In order to check whether component's internal send buffer is empty you have property BufferedByteCount. If your application has to close the connection when all data has been sent, you should use method ShutDown(1) from the OnDataSent event, this makes sure the receiver will receive everything. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be