C
Corn1
Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi7里TcpSocket和TcpClient之间怎么通讯?我用如下代码:(TcpSocket和TcpClient均已Active)。
procedure TForm1.Button1Click(Sender: TObject);
begin
TcpClient1.Active:=True;
TcpClient1.Sendln(Edit1.Text);
TcpClient1.Active:=False;
end;
procedure TForm1.TcpServer1Accept(Sender: TObject;
ClientSocket: TCustomIpClient);
begin
Edit2.Text:=ClientSocket.Receiveln;
end;
但Edit2里没显示,请问是怎么回事?
procedure TForm1.Button1Click(Sender: TObject);
begin
TcpClient1.Active:=True;
TcpClient1.Sendln(Edit1.Text);
TcpClient1.Active:=False;
end;
procedure TForm1.TcpServer1Accept(Sender: TObject;
ClientSocket: TCustomIpClient);
begin
Edit2.Text:=ClientSocket.Receiveln;
end;
但Edit2里没显示,请问是怎么回事?