> When I call TWSocket's Send method, I'm getting error 10057, > "Send Socket is not connected"
It is because you call Send immediately after Calling Connect. TWSocket is a NON-BLOCKING component. When you call Connect, you get control back immediately (the next line execute immediately) while the connection is established in the background (It could take several seconds on the Internet). Once the connection is established, you have OnSessionConnected triggered and you can start sending data. When you send data, you data goes into a send buffer and you get control back - again - immediately while you data is sent at network speed in the background. Once your data in sent (the buffer is emptyed), you get OnDataSent event. You may call several Send in a raw, your data is simply appended in the internal send buffer. You get OnDataSent only when the buffer is emptyed, not for each send. So in your code, move your sending code to OnSessionConnected event handler, after of course having tested ErrCode argument to know if the connection was successful. 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 -- 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
