Maybe you could leave the current socket and use a new one for your next attempt? Then simply free the old one when it finishes the connect (probably with a winsock connection timeout error).
Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Terentiev Sent: 02 August 2006 11:23 To: ICS support mailing Subject: Re: [twsocket] Connect() time out Hello, Francois, I call SmtpCli->Connect(). If it's timed out - I call SmtpCli->Abort(). After it I start New smtp session and call SmtpCli->Connect() for next email. I receive 10004 in SmtpRequestDone. Please note: after TimeOut and SmtpCli->Abort() i receive 10004 error for next 20-30 Connect attempts ! --- With best regards, Max Terentiev. Business Software Products. AMS Development Team. [EMAIL PROTECTED] ----- Original Message ----- From: "Francois Piette" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Wednesday, August 02, 2006 1:27 PM Subject: Re: [twsocket] Connect() time out >> How to cancel SmtpCli->Connect() call if this connection attempt >> is timed out ? >> >> If SmtpCli->Connect() terminated by SmtpCli->Abort() - I notice MANY >> 10004 errors during next connection attempts. > > Abort is the way to go. It close the socket at winsock level. > Which winsock call is producing error 10004 ? > > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html > -- > [EMAIL PROTECTED] > Author of ICS (Internet Component Suite, freeware) > Author of MidWare (Multi-tier framework, freeware) > http://www.overbyte.be > > > ----- Original Message ----- > From: "Max Terentiev" <[EMAIL PROTECTED]> > To: "ICS support mailing" <twsocket@elists.org> > Sent: Wednesday, August 02, 2006 11:16 AM > Subject: [twsocket] Connect() time out > > >> Hello, >> >> How to cancel SmtpCli->Connect() call if this connection attempt >> is timed out ? >> >> If SmtpCli->Connect() terminated by SmtpCli->Abort() - I notice MANY >> 10004 errors during next connection attempts. >> >> Maybe it's needed to call some Winsock API function directly on >> SmtpCli->CtrlSocket ? >> >> What is proper way to cancel Connect() by timeout ? >> >> --- >> With best regards, Max Terentiev. >> Business Software Products. >> AMS Development Team. >> [EMAIL PROTECTED] >> >> -- >> 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 > -- > 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 > -- 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 -- 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