Network Class Reference

Network-related routines. More...

#include <Network.h++>

List of all members.

Static Public Member Functions

static size_t getInterfaces (std::vector< NetworkInterface > &list) throw (SystemException)
 Get a list of all available network interfaces on the host system.
static uint16_t getPortForService (const String &service, NetProtocol &proto) throw ()
 Look up the port number for the given network service.
static String getServiceForPort (uint16_t port, NetProtocol &proto) throw ()
 Look up the network service name for the given port number.

Friends

class InetAddress

Detailed Description

Network-related routines.

Author:
Mark Lindner

Member Function Documentation

size_t getInterfaces ( std::vector< NetworkInterface > &  list  )  throw (SystemException) [static]

Get a list of all available network interfaces on the host system.

Parameters:
list The list in which to store the interface information.
Returns:
The number of interfaces retrieved.
Exceptions:
SystemException If an error occurs while retrieving the information.
uint16_t getPortForService ( const String service,
NetProtocol proto 
) throw () [static]

Look up the port number for the given network service.

Parameters:
service The name of the service.
proto The protocol of the service; if ProtoAny, the value is updated to reflect the actual protocol of the service.
Returns:
The port number of the service, or 0 if no matching service was found.
String getServiceForPort ( uint16_t  port,
NetProtocol proto 
) throw () [static]

Look up the network service name for the given port number.

Parameters:
port The port number.
proto The protocol of the service; if ProtoAny, the value is updated to reflect the actual protocol of the service.
Returns:
The name of the service, or String::null if no matching service was found.

Friends And Related Function Documentation

friend class InetAddress [friend]

The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:09 2011 for libcommonc++ by  doxygen 1.6.3