Arno, <<ICS works asynchronous, means when ICSSocket_Sending.Connect returns you are not necessarily connected yet. Send your first bytes from OnSessionConnected. However you should get an exception if you are not connected when sending something.>>
Thanks, that works just fine. I am now adding the messages to a stringList in the method above, and then calling ICS_SendString() in the SessionConnected() event, looping through the stringlist and then deleting all of its items afterwards. <<Where do you assign OnClientConnect?>> Directly in the DFM: Procedure TfJCPServer.ICSSocketServer_Listening_ClientAppClientConnect(Sender:TObject; Client: TWSocketClient; Error: Word); begin if Error <> 0 then begin InsertIntoExceptionLog( CurrentUser, GetMachineName, SocksErrorCodeToStr(Error), IntToStr(Error)); Exit; end; InsertEventLog(SOCKET_EVENT, 'ICSSocketServer_Listening_ClientAppClientConnect'); with Client as TTcpSrvClient do begin LineMode := True; LineEdit := True; LineLimit := 255; { Do not accept long lines } //changed from 80 OnDataAvailable := ClientDataAvailable_ClientApp; OnLineLimitExceeded := ClientLineLimitExceeded_ClientApp; OnBgException := ClientBgException_ClientApp; ConnectTime := Now; end; end; BTW, didn't you have something to do with "Alice's Restaurant"?
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer.
-- 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