Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Simple Indy Server doesn't receive in order
| Subject: | Simple Indy Server doesn't receive in order |
| Posted by: | "Rael" (rael@nospam.com) |
| Date: | Sun, 1 Apr 2007 14:04:14 |
I have a simple idTCPClient and idTCPServer but messages aren't received in
order...
Client:
Var
_Client: TIdTCPClient;
class procedure TSimpleClass.Send(S: String);
begin
Try
_Client.Connect;
_Client.IOHandler.WriteLn(S);
Finally
_Client.Disconnect;
End;
end;
Initialization
_Client := TIdTCPClient.Create(nil);
_Client.Host := '127.0.0.1';
_Client.Port := 6000;
Finalization
_Client.Free;
Server:
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
Var
S: String;
begin
S := Acontext.Connection.IOHandler.ReadLn;
Memo1.Lines.Add( S);
end;
What am I doing wrong?? How can I fix this?
Thanks, Rael