1,593
社区成员
发帖
与我相关
我的任务
分享
var
timeout: integer;
begin
ClientSocket.Host:=hostedit.Text;
ClientSocket.Port:=strtoint(portedit.Text);
ClientSocket.Open;
timeout := 0;
while not ClientSocket.Socket.Connected and (timeout< 500) do
begin
Application.ProcessMessages;
Sleep(1);
inc(timeout);
end;
if ClientSocke.Socket.Connected then begin
ClientSocket.Socket.SendText('abcd');
end;
end;