Loading...
Searching...
No Matches
psocksxx::sockaddr Class Referenceabstract

Socket address base class. More...

`#include <sockaddr.h>`

Inheritance diagram for psocksxx::sockaddr:

## Public Types

enum | address_t { af_unspec = AF_UNSPEC , af_local = AF_LOCAL , af_inet = AF_INET }

## Public Member Functions

virtual | ~sockaddr ()
| destructor
virtual socklen_t | size () const throw () =0
| get POSIX socket address size
virtual ::sockaddr * | psockaddr () const throw () =0
| get a POSIX socket address structure

## Detailed Description

Socket address base class.

This abstract class acts as an interface for accessing derived socket address structures.

## Member Enumeration Documentation

## address_t

enum psocksxx::sockaddr::address_t

socket address types definition

Enumerator
af_local | unspecified
af_inet | local addresses

## Member Function Documentation

## psockaddr()

virtual ::sockaddr * psocksxx::sockaddr::psockaddr | ( |  | ) | const
throw | ( |
| ) |  |

pure virtual

get a POSIX socket address structure

Returns
  POSIX socket address structure

Helper function to get a pointer to the POSIX socket address structure relating to this socket address instance.

Implemented in psocksxx::lsockaddr, and psocksxx::nsockaddr.

## size()

virtual socklen_t psocksxx::sockaddr::size | ( |  | ) | const
throw | ( |
| ) |  |

pure virtual

get POSIX socket address size

Returns
  POSIX address size

Helper function to get the size of the related POSIX socket address.

Implemented in psocksxx::lsockaddr, and psocksxx::nsockaddr.