2#include <cosmos/error/RuntimeError.hxx> 
    3#include <cosmos/net/SocketAddress.hxx> 
    4#include <cosmos/utils.hxx> 
    9        if (new_length != this->
size()) {
 
   10                cosmos_throw(
RuntimeError(
"inconsistent socket address size on return"));
 
 
   16        std::memset(addr, 0, 
maxSize());
 
   17        addr->sa_family = to_integral(
family());
 
 
Exception type for generic runtime errors.
void clear()
Clears the complete address structure.
virtual void update(size_t new_length)
Update the address structure after it has been filled in by the kernel.
virtual size_t maxSize() const
Returns the maximum number of bytes the socket address can hold.
virtual SocketFamily family() const =0
Returns the concrete SocketFamily for the implementation address type.
virtual size_t size() const =0
Returns the size of the socket address in bytes found at basePtr().
virtual sockaddr * basePtr()=0
Returns a mutable pointer to the sockaddr* base structure.