S
sky2008
Unregistered / Unconfirmed
GUEST, unregistred user!
200分求助:为什么 ClientSocket1.Open;之后马上用 ClientSocket1.Socket.SendText(),的话服务端收不到?而在open延时1秒后再sendText(),却能马上收到!是 borland 的bug? (200分)<br />procedure TForm1.Button1Click(Sender: TObject);
begin
ClientSocket1.Open;
ClientSocket1.Socket.SendText( timetostr( now ()));
end;
第一次点Button1时,服务器端都收不到数据,如果改成下面的却可以。为找了半天找不到答案
procedure TForm1.Button1Click(Sender: TObject);
begin
ClientSocket1.Open;
sleep(0);
application.ProcessMessages;
ClientSocket1.Socket.SendText( timetostr( now ()));
end;
begin
ClientSocket1.Open;
ClientSocket1.Socket.SendText( timetostr( now ()));
end;
第一次点Button1时,服务器端都收不到数据,如果改成下面的却可以。为找了半天找不到答案
procedure TForm1.Button1Click(Sender: TObject);
begin
ClientSocket1.Open;
sleep(0);
application.ProcessMessages;
ClientSocket1.Socket.SendText( timetostr( now ()));
end;