采用tcp连接的时候服务端有什么办法能够获得客户端的访问ip和端口及其其他一些信息?

解决方案 »

  1.   

    Remobjects是用INDY做的底层通讯,你用RemoteHost、RemotePort看看能不能获取,手上没有Remobjects,不知道说得对不对,楼主试试。
      

  2.   

    procedure TLoginService.SimpleLoginServiceGetDispatchInfo(
      const aTransport: IROTransport; const aMessage: IROMessage);
    var
      tcpinfo: IROTCPTransport;
    begin  if Supports(aTransport, IROTCPtransport, tcpinfo) then
      begin
        Session['ClientIP'] := tcpinfo.GetClientAddress;
      end;end;