我想用它接收数据,由于server使用c编写的linux下执行的,有什么要注意的?接收用哪个函数呢?
我的邮箱[email protected]
接受数据为什么不用TcpServer控件呢?
我这有做的使用TcpClient发送和使用TcpServer接收数据的程序。
比如:
设置对应的端口号:LocalPort := 8890 ,就可以接收端口发过来的数据了。数据处理在OnAccept事件中处理。如下:
procedure TForm.TcpServer1Accept(Sender: TObject;
ClientSocket: TCustomIpClient);
var
s: string;
begin
s := ClientSocket.Receiveln;//这就是接收到的返回
//中间可以对“S”进行字符串操作,从而判断
if s='OK' then
begin
memo1.Lines.Add('通讯成功,返回数据');
memo1.Lines.Add(s);
end;
end;
不明白可以Hi我。