psocksxx
1.0.0
|
Socket address class for IPv4 addresses. More...
#include <nsockaddr.h>
Public Member Functions | |
nsockaddr (const char *node, unsigned short port) throw ( sockexception ) | |
constructor More... | |
nsockaddr (unsigned short port) throw () | |
constructor More... | |
nsockaddr (const char *node, const char *service) throw ( sockexception ) | |
constructor More... | |
socklen_t | size () const throw () |
get POSIX socket address size More... | |
::sockaddr * | psockaddr () const throw () |
get a POSIX socket address structure More... | |
![]() | |
virtual | ~sockaddr () |
destructor | |
Protected Member Functions | |
in_addr_t | resolve_node (const char *node) throw ( sockexception ) |
convert a node name to a IPv4 address More... | |
Additional Inherited Members | |
![]() | |
enum | address_t { af_unspec = AF_UNSPEC, af_local = AF_LOCAL, af_inet = AF_INET } |
Socket address class for IPv4 addresses.
This class holds the socket addressing structure for IPv4 socket communications.
psocksxx::nsockaddr::nsockaddr | ( | const char * | node, |
unsigned short | port | ||
) | |||
throw | ( | sockexception | |
) |
constructor
node | node (host name or IP) |
port | port number |
psocksxx::sockexception | socket exception |
Create a IPv4 socket address instance with the give node and port information.
psocksxx::nsockaddr::nsockaddr | ( | unsigned short | port | ) | |
throw | ( | ||||
) |
constructor
port | port number |
Create a IPv4 socket address instance with the given port and the node (host/IP) will be any available interface on the host computer.
psocksxx::nsockaddr::nsockaddr | ( | const char * | node, |
const char * | service | ||
) | |||
throw | ( | sockexception | |
) |
constructor
node | node (host name or IP) |
service | port number of the service name (e.g. "http") |
psocksxx::sockexception | socket exception |
Create a IPv4 socket address instance with the give node and service information.
|
virtual |
get a POSIX socket address structure
Helper function to get a pointer to the POSIX socket address structure relating to this socket address instance.
Implements psocksxx::sockaddr.
|
protected |
convert a node name to a IPv4 address
node | node (host name or IP) |
psocksxx::sockexception | socket exception |
Helper function to convert a node name into a IPv4 network address.
|
virtual |
get POSIX socket address size
Helper function to get the size of the related POSIX socket address.
Implements psocksxx::sockaddr.