W
whynozg2005
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
begin
Memo1.Text:=AContext.Connection.IOHandler.ReadLn('<E>');
AContext.Connection.IOHandler.WriteLn('BBBBBBBB<E>');
AContext.Connection.Disconnect;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
IdTCPClient1.Connect;
IdTCPClient1.IOHandler.WriteLn('11111'+#13#10+'2222<E>');
Memo2.Text:=IdTCPClient1.IOHandler.ReadLn('<E>');
IdTCPClient1.Disconnect;
end;
Button1点击第2次,出错。
begin
Memo1.Text:=AContext.Connection.IOHandler.ReadLn('<E>');
AContext.Connection.IOHandler.WriteLn('BBBBBBBB<E>');
AContext.Connection.Disconnect;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
IdTCPClient1.Connect;
IdTCPClient1.IOHandler.WriteLn('11111'+#13#10+'2222<E>');
Memo2.Text:=IdTCPClient1.IOHandler.ReadLn('<E>');
IdTCPClient1.Disconnect;
end;
Button1点击第2次,出错。