Arno,
I have been testing with ICSlogger attached in my client app, as you recommended, and have listed the results below. As far as I can interpret the log, the session is closed due to winsock error 10053 ? "WSAECONNABORTED 10053 Software caused connection abort. An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error." In my server application I am logging all failed connection attempts e.g. if WSocket->Accept() returns invalid socket handle, but none appear. Can you see something else from the provided log ? As a side note, the error seems to appear more frequently if I send data to the server in the clients OnHandshakeDone event, after ErrCode = 0 and PeerCert->PostConnectionCheck("mydowmain.com") returns true, using the SslWSoclet::SendtStr() function, than just connecting running a for-loop and then disconnecting from the server. Come to think of it, my SSL client app is running on Windows XP Pro SP3 and my SSL server app is running on Windows Server 2003 SP2. I seem to recall some maximum outbound connection count of 10 sessions/sec on a Windows XP Pro. I am running my test app With 30 concurrent threads connecting to the server, waiting for HandshakeDone, sleeping 100 mSec and then disconnecting. My session counter in the server app however does show a "stable" count of 30 active sessions. Could this be the cause of my problems ? Best regards Kurt ThreadID: 3456: ICSlogger: 17:09:06:198 TWSocket will connect to 172.16.3.100:443 ThreadID: 3456: ICSlogger: 17:09:06:214 03B140D0 StartSslHandshake 572 ThreadID: 3456: ICSlogger: 17:09:06:214 03B140D0 InitSSLConnection 572 ThreadID: 3456: ICSlogger: 17:09:06:417 03B140D0 BIO_ctrl(sslbio, BIO_C_SET_SSL, BIO_NOCLOSE, 0x34A2048) = 1 [14157] ThreadID: 3456: ICSlogger: 17:09:06:432 ICB> SSL_CB_HANDSHAKE_START ThreadID: 3456: ICSlogger: 17:09:06:432 ICB> SSL_connect: before/connect initialization ThreadID: 3456: ICSlogger: 17:09:06:432 ICB> SSL_connect: SSLv2/v3 write client hello A ThreadID: 3456: ICSlogger: 17:09:06:432 ICB> SSL_connect: error in SSLv2/v3 read server hello A ThreadID: 3456: ICSlogger: 17:09:06:432 03B140D0 BIO_read(sslbio, 0x1, 0) = -1 [14211] ThreadID: 3456: ICSlogger: 17:09:06:432 03B140D0 BIO_should_retry(sslbio) = 1 [14217] ThreadID: 3456: ICSlogger: 17:09:06:432 03B140D0 TriggerEvent sslFdRead 572 ThreadID: 3456: ICSlogger: 17:09:06:432 03B140D0 TriggerEvent sslFdWrite 572 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 TCustomSslWSocket.Do_FD_WRITE 572 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 BIO_ctrl_pending(nbio) = 108 [14249] ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 BIO_read(nbio, 0x2C2BCA8, 108) = 108 [14257] ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 my_RealSend (0x23C, 46316712, 108) = -1 [14267] ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 TriggerEvents 572 SslState: SSL_ST_INIT // MayFD_Read=-1 MayDoRecv=-1 MayFD_Write=0 MaySslTryToSend=-1 bSslAllSent=0 bAllSent=0 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 BIO_ctrl_pending(nbio) = 0 [14280] ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 BIO_ctrl_get_write_guarantee(nbio) = 4096 [14290] ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 TCustomSslWSocket.Do_FD_CLOSE error #10053 572 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 *CloseCalled 572 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 Socket data pending: 0 Err: 0 572 ThreadID: 3456: ICSlogger: 17:09:06:448 03B140D0 SslHandshakeDone(1) 572. Secure connection with Unknown, cipher Unknown, 0 secret bits (0 total), session reused=False ThreadID: 3456: ***HandShake Error = 1[Not a WinSock error] -----Oprindelig meddelelse----- Fra: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] På vegne af Arno Garrels Sendt: 1. september 2010 14:51 Til: ICS support mailing Emne: Re: [twsocket] TSslWSocket in a non-blocking multithreaded server Kurt Andersen wrote: > On a side note, I have been hammering away on my Server app using a > (homemade) multithreaded SSL client, and sometimes > I get a ErrCode = 1 in the OnHandShakeDone event. > > Do you have any idea as to what might be causing this ? It can be anything. Specific SSL error codes are currently not passed to the OnHandShakeDone event. Logging with TIcsLogger is the only way to find the reason for such errors. > > Is there any way to (re)Start the handshake after the error occurred, > without closing the connection first ? I do not think so, the connection is closed on any handshake error AFAIR. -- Arno Garrels > > Best regards > Kurt -- 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