serversocket的问题 ( 积分: 2 )

  • 主题发起人 主题发起人 yenel
  • 开始时间 开始时间
Y

yenel

Unregistered / Unconfirmed
GUEST, unregistred user!
clientsocket和serversocket在同一个程序上 地址写本地地址,断口也一样,但好象serversocket没有接受到,大家看看

procedure TForm1.Button1Click(Sender: TObject);
begin
with clientsocket1 do
begin
open;
socket.SendText(edit1.Text);
end;
end;

procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
Listbox1.Items.Add(serversocket1.Socket.ReceiveText);
end;
 
clientsocket和serversocket在同一个程序上 地址写本地地址,断口也一样,但好象serversocket没有接受到,大家看看

procedure TForm1.Button1Click(Sender: TObject);
begin
with clientsocket1 do
begin
open;
socket.SendText(edit1.Text);
end;
end;

procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
Listbox1.Items.Add(serversocket1.Socket.ReceiveText);
end;
 

Similar threads

I
回复
0
查看
775
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部