Hello DZ-Jay,

> Close() ultimately calls Shutdown(1) -- so wouldn't it have the same
> effect?

As I recall not exacly the same. Close calls Shutdown(1) and close the
socket. If you call Shutdown(1) the socket will not be immediatly close,
but if there is still some data it will be send, and the other end will
tell it is ready to close when receiving the data. Then the socket will
be closed by winsock (and OnSessionClosed is then called).

> I thought the buffer
> was cleared when read (ReceivedStr property), or am I wrong?

Yes it is. If OnDataAvailable is called when you call close (with some
data) then the other end has send some data, or there is somewhere a
re-entrance problem (somewhere calling the message pump?).

Rgds, Wilfried [TeamICS]

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

Reply via email to