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 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-16   10:55:50   SocketChangeState, wsOpened - wsConnecting
 2010-04-16   10:55:50   SocketChangeState, wsConnecting - wsConnected
 2010-04-16   10:55:50   SocketSessionConnected, Socket operation on 
 non-socket (#10038)
 2010-04-16   10:55:50   00D41210 TCustomWSocket.Shutdown 1 1472
 
 Any ideas why it could happen?
 
 --
 Anton
 --
 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

--
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


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  10:56:00SocketChangeState, wsClosed - wsOpened
2010-04-16  10:56:00TWSocket will connect to 200.255.94.90:2101
2010-04-16  10:56:00SocketChangeState, wsOpened - wsConnecting
2010-04-16  10:56:00SocketChangeState, wsConnecting - wsConnected
2010-04-16  10:56:00SocketSessionConnected, Socket operation on 
non-socket (#10038)
2010-04-16  10:56:0000D41210 TCustomWSocket.Shutdown 1 1472
2010-04-16  10:56:00SocketChangeState, wsConnected - wsClosed
2010-04-16  10:56:00SocketSessionClosed

I suppose if there was a sudden connection break, the Shutdown shouldn't have 
been called? Seems that problem is on the client side.
I searched through the log and noticed that line

00D41210 TCustomWSocket.Shutdown 1 1472

repeats several times (i.e. the same handle 1472 several times after closing!). 
Seems like not clearing socket handle. Strange...

-- 
Anton
--
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


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 up a break point when you open the connection to the socket. 
Then step through the execution to find out which operation is causing 
the error and why.


Also, perhaps posting the Call Stack may help, though it will only 
reflect the point when the error was trapped.


dZ.

--
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