Re: [twsocket] Error "Socket operation on non-socket"

2010-04-22 Thread Anton Sviridov
>The safest way is to PostMessage a custom message from SessionClosed event >and reconnect from the corresponding event handler. Well, that's exactly what I'm doing: if (not FInternalClose) and (FState in [csConnected, csRequesting, csReceivingData]) then PostState(csReconnect); So you re

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-22 Thread Francois PIETTE
So what's the right and proper way to reconnect a socket? Should I start reconnecting only from SocketSessionClosed? The safest way is to PostMessage a custom message from SessionClosed event and reconnect from the corresponding event handler. -- francois.pie...@overbyte.be The author of the

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-22 Thread Anton Sviridov
Good morning to all, I have done some investigations and noticed one interesting thing: the error appears only when the socket handle is equal to previous. Here's the log: (SetState is my procedure to change client's state, and I also added to TWSocket code two log writes: "TCustomWSocket.Connec

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread DZ-Jay
Anton Sviridov wrote: wilfried, dZ, the strangest thing is that socket is created and connected directly before the bug. Here is what happens next: Can you tell what is being called exactly at the moment the error occurs? Try adding the ICS source directory to your Library Path and setting u

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread Anton Sviridov
Hello all, sorry for doubling the messages - from web interface I somewhy can't see the text of my mails, though in the digest arrived text is present. wilfried, dZ, the strangest thing is that socket is created and connected directly before the bug. Here is what happens next: 2010-04-16 1

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread DZ-Jay
Hello: It seems like the connection was dropped unexpectedly by the other side. "Socket operation on non-socket" means that a WinSock call was sent on a closed socket or invalid handle. dZ. On Apr 16, 2010, at 03:48, Anton Sviridov wrote: > *something wrong with my previous ma

Re: [twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread wilfried Mestdagh
Aan: twsocket@elists.org Onderwerp: [twsocket] Error "Socket operation on non-socket" >From time to time in my program I encounter strange error on connecting. Here's a piece of socket log: 2010-04-16 10:55:50SocketChangeState, wsClosed -> wsOpened 201

[twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread Anton Sviridov
*something wrong with my previous mail, retrying...* >From time to time in my program I encounter strange error on connecting. Here's a piece of socket log: 2010-04-16 10:55:50 SocketChangeState, wsClosed -> wsOpened 2010-04-16 10:55:50 TWSocket will connect to 200.255.94.90:2101 2010-04-

[twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread Anton Sviridov
*something wrong with my previous mail, retrying...* >From time to time in my program I encounter strange error on connecting. Here's a piece of socket log: 2010-04-16 10:55:50SocketChangeState, wsClosed -> wsOpened 2010-04-16 10:55:50TWSocket will connect to 200.255.94.

[twsocket] Error "Socket operation on non-socket"

2010-04-16 Thread Anton Sviridov
>From time to time in my program I encounter strange error on connecting. Here's a piece of socket log: 2010-04-16 10:55:50SocketChangeState, wsClosed -> wsOpened 2010-04-16 10:55:50TWSocket will connect to 200.255.94.90:2101 2010-04-16 10:55:50SocketChangeSt