Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PIPSocket::GetPeerHostName (  )  [inherited]

Get the host name for the peer host the socket is connected to.

Returns:
Name of the host, or an empty string if an error occurs.

Definition at line 1930 of file sockets.cxx.

References PString::Empty(), PIPSocket::GetHostName(), and PIPSocket::GetPeerAddress().

Referenced by PSMTPServer::OnEHLO(), and PSMTPServer::OnHELO().

{
  Address addr;

  if (GetPeerAddress(addr))
    return GetHostName(addr);

  return PString::Empty();
}


Generated by  Doxygen 1.6.0   Back to index