CarobNS::SocketAddress Class Reference

Wraps a sockaddr, its size and provides a less than operator so it can be the keys of stl maps. More...

#include <SocketAddress.hpp>

List of all members.

Public Member Functions

 SocketAddress ()
 Empty constructor.
 SocketAddress (const SocketAddress &sa)
 Copy constructor, calls = operator.
 ~SocketAddress ()
 frees address field
 SocketAddress (sockaddr *sa, socklen_t l)
 Creates a SocketAddress with the given address and length.
void setAddress (const sockaddr *sa, socklen_t l)
 Set the given address and length.
SocketAddressoperator= (const SocketAddress &sa)
 Assignement operator, calls setAddress(const sockaddr* sa, socklen_t l).
bool operator< (const SocketAddress &sa) const
 Less than operator, so SocketAddress can be keys of stl maps.
const sockaddr * getAddressPtr () const
 Returns a pointer to the socket address.
socklen_t getAddressLength () const
 Returns the socket address length.
sa_family_t getFamily () const
 Gets the address family of this socket.


Detailed Description

Wraps a sockaddr, its size and provides a less than operator so it can be the keys of stl maps.


Constructor & Destructor Documentation

CarobNS::SocketAddress::SocketAddress ( const SocketAddress sa  ) 

Copy constructor, calls = operator.

Parameters:
sa the socket address to copy infos from

CarobNS::SocketAddress::SocketAddress ( sockaddr *  sa,
socklen_t  l 
)

Creates a SocketAddress with the given address and length.

Calls setAddress(const sockaddr* sa, socklen_t l)

Parameters:
sa the socket address
l length of sa


Member Function Documentation

void CarobNS::SocketAddress::setAddress ( const sockaddr *  sa,
socklen_t  l 
)

Set the given address and length.

Parameters:
sa the socket address to set
l length of sa


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7