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;
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;