P
porsche
Unregistered / Unconfirmed
GUEST, unregistred user!
动态创建的ClientSocket为什么不能SendText?
procedure TForm1.Button1Click(Sender:TObject); //发送不了
var ClientSocket2:TClientSocket;
begin
ClientSocket2:=TClientSocket.Create(Application);
try
ClientSocket2.Address:='192.168.0.10';
ClientSocket2.Port:=2161;
ClientSocket2.Open;//or ClientSocket2.Active:=True;
ClientSocket2.Socket.SendText('中华人民共和国');
finally
ClientSocket2.Free;
end;
end;
[red]源文件请下载(161K) [/red]http://www.wansoft.com.cn/porsche/download/SocketDll.zip
procedure TForm1.Button1Click(Sender:TObject); //发送不了
var ClientSocket2:TClientSocket;
begin
ClientSocket2:=TClientSocket.Create(Application);
try
ClientSocket2.Address:='192.168.0.10';
ClientSocket2.Port:=2161;
ClientSocket2.Open;//or ClientSocket2.Active:=True;
ClientSocket2.Socket.SendText('中华人民共和国');
finally
ClientSocket2.Free;
end;
end;
[red]源文件请下载(161K) [/red]http://www.wansoft.com.cn/porsche/download/SocketDll.zip