In WSocket's DO_FD_CONNECT procedure, the socket state is set to wsConnected
even if the socket has failed to connect (for example, on 10061 error), then
the SessionConnected handler is called and after that, check for actual
error is performed, where socket is closed when error is not zero (like
10061). Im not sure if this is correct - shouldn't be the error checking
performed first?

I'm asking because I have some code that checks for TWSocket's state to
access some of the properties. In some cases it's possible that when
socket's State is wsConnect, my code accesses, among other things,
GetPeerPort and GetXPort which results in exceptions because socket is not
actually connected.

Piotr Dałek

Dzwon tanio!
Sprawdz >> http://linkint.pl/f29a1

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

Reply via email to