主机:127.00.0.1;端口:5001;读取超时:3000;
//Following codes to get the response
procedure TForm1.Button2Click(Sender: TObject);
var
s:string;
begin
try
while True do
begin
s := s+IdTCPClient1.IOHandler.ReadChar();
end;
finally
showmessage(s);
....other operations...
end;
//....
当timerout时,其他操作的部分将不会被执行。有什么想法可以继续代码吗?谢谢。