S shihong Unregistered / Unconfirmed GUEST, unregistred user! 2006-05-14 #1 我用delphi编了个服务器,当有客户端连上来的时候,要获取客户端的ip和端口,怎么样才能实现呢,同时,若我想断开服务器,应该怎么做,才能实现呢
Z zhlfdm Unregistered / Unconfirmed GUEST, unregistred user! 2006-05-15 #3 procedure TForm1.ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket); begin edit1.Text :=socket.LocalAddress ; end;
procedure TForm1.ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket); begin edit1.Text :=socket.LocalAddress ; end;
S shihong Unregistered / Unconfirmed GUEST, unregistred user! 2006-05-15 #5 zhlfdm:我要在服务器端获得客户端的ip和端口,不是在客户端获得本地ip和端口的。