Wizard
Software Engineering Project - Wizard
|
#include <sock_address.h>
Public Member Functions | |
sock_address_any () | |
sock_address_any (const sockaddr *addr, socklen_t n) | |
sock_address_any (const sockaddr_storage &addr, socklen_t n) | |
sock_address_any (const sock_address &addr) | |
socklen_t | size () const override |
const sockaddr * | sockaddr_ptr () const override |
sockaddr * | sockaddr_ptr () override |
![]() | |
virtual | ~sock_address () |
virtual sa_family_t | family () const |
Generic socket address.
This is a wrapper around sockaddr_storage
which can hold any family address. This should have enough memory to contain any address struct for the system on which it is compiled.
|
inline |
Constructs an empty address. The address is initialized to all zeroes.
|
inline |
Constructs an address.
addr | Pointer to a buffer holding the address. |
n | The number of valid bytes in the address |
std::length_error | if n is greater than the maximum size of an address. |
|
inline |
Constructs an address.
addr | The buffer holding the address. |
n | The number of valid bytes in the address |
std::length_error | if n is greater than the maximum size of an address. |
|
inline |
Copies another address to this one.
addr | The other address to copy into this one. |
|
inlineoverridevirtual |
Gets the size of the address.
Implements sockpp::sock_address.
|
inlineoverridevirtual |
Gets a pointer to this object cast to a sockaddr.
Implements sockpp::sock_address.
|
inlineoverridevirtual |
Gets a pointer to this object cast to a sockaddr.
Implements sockpp::sock_address.