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

PString PSocket::GetNameByProtocol ( WORD  proto  )  [static, inherited]

Get the name of the protocol number specified.

Returns:
Name of protocol or the number if the protocol was not found.
Parameters:
proto  Number of protocol

Definition at line 1528 of file sockets.cxx.

{
#if !defined(__NUCLEUS_PLUS__) && !defined(_WIN32_WCE) && !defined(P_VXWORKS)
  struct protoent * ent = getprotobynumber(proto);
  if (ent != NULL)
    return ent->p_name;
#endif

  return psprintf("%u", proto);
}


Generated by  Doxygen 1.6.0   Back to index