各位先行者:
我想设计一个DELPHI IDTCPserver/IDTCPClient设计内网和外网的信息传递程序,有谁能提供代码程序啊
我想设计一个DELPHI IDTCPserver/IDTCPClient设计内网和外网的信息传递程序,有谁能提供代码程序啊
1 楼
self.IdTCPClient1.Host:='ip';
self.IdTCPClient1.Port:=port;
try
IdTCPClient1.Connect(5000);
IdTCPClient1.WriteBuffer( ....... );
IdTCPClient1.Disconnect;
except
..........
end;
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
with AThread.Connection do
begin
ReadBuffer(.....)
end;
end;
self.IdTCPClient1.Port:=port;
try
IdTCPClient1.Connect(5000);
IdTCPClient1.WriteBuffer( ....... );
IdTCPClient1.Disconnect;
except
..........
end;
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
with AThread.Connection do
begin
ReadBuffer(.....)
end;
end;