Re: [twsocket] Connect, send and close

2006-11-22 Thread Francois Piette
> I need a "client" function that connects to server, > send data and close connection. You'd better design your application using the asynchronous mode which is the native mode for ICS. In short, use the events ! > Here, the result is false everytimes because the socket is never connected. This

Re: [twsocket] Connect, send and close

2006-11-21 Thread Engi
A little error in my code. I repost it - Original Message - From: "Engi" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, November 22, 2006 8:24 AM Subject: [twsocket] Connect, send and close bool __fastcall TfrmMain::SendCde(int PortIP,

[twsocket] Connect, send and close

2006-11-21 Thread Engi
Hi, I need a "client" function that connects to server, send data and close connection. My code is : bool __fastcall TfrmMain::SendCde(int PortIP, AnsiString Cde) { bool Result; int Sent; WSocket->LineMode = true; WSocket->LineEnd = "\r\n"; WSocket->Proto = "tcp"; WSocket->Port = PortI