I had not noticed you where using threads. SZ is right: you need a message pump in your thread. There are several multithread sample delivered with ICS-V5 (They are good for ICS-V6)
btw: You frequently don't need thread with ICS because it is asynchronous and non-blocking. It multitask automatically WITHOUT using threads. Programming is then much easier... -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "info2004" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Thursday, March 08, 2007 6:49 PM Subject: Re: [twsocket] TWSocket not connecting for me > Francois, > > Thanks for the response. > > The .State parameter stays at wsConnecting for minutes - then I terminate. > > I am going to look at SZ's messagepump angle, as that sounds quite > promising. > > Regards, > > Andy > Francois PIETTE wrote: >> Maybe your problem is that when calling Connect you ask the component to >> connect. You get control back immediately (asynchronous method) while the >> component try to establish the connection for you. Once the connection is >> established, you have OnSessionConnected event which is triggered. This >> is >> where you can start playing with send/receive. >> >> -- >> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html >> -- >> [EMAIL PROTECTED] >> http://www.overbyte.be >> >> >> ----- Original Message ----- >> From: "info2004" <[EMAIL PROTECTED]> >> To: "ICS support mailing" <twsocket@elists.org> >> Sent: Thursday, March 08, 2007 5:46 PM >> Subject: [twsocket] TWSocket not connecting for me >> >> >>> Hi, >>> >>> I have a problem with TWSocket.State staying as wsConnecting after I try >>> and connect. >>> >>> I am using a thread to execute an SQL query. For each result from this >>> query, I connect to a remote server using the TWSocket, and send some >>> data. That's the plan. >>> >>> In the Thread.Execute procedure, I have created the TWSocket, then I run >>> through a state machine to query the database, make the connection etc. >>> >>> Does anyone know why .State would stay at wsConnecting? >>> >>> I can connect to the server manually using telnet, and I don't have any >>> problems providing additional info. Just didn't want to overload the >>> email at this point. >>> >>> Thanks, >>> >>> Andy >>> -- >>> 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