// $Id$
//
-// Copyright (C) 2008
+// Copyright (C) 2008
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
#include <iostream>
//#include "BSDSocketAddress.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
/** \brief Socket addressing, BSD style
-
+
BSDSocketAddress is the base class of all BSD \c sockaddr based addressing classes. The \c
sockaddr addressing interface is split into several parts
}
}
\endcode
-
+
All these classes provide a generic \c sockaddr API to interface with legacy \c sockaddr
based code (e.g. the BSD socket API). In this base-class, this interface is read-only, the
derived classes however provide a read-write interface.
each typed derived class
(e.g. INet4Address::addressFamily) */
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Generic sockaddr interface
- ///\{
+ //\{
struct sockaddr const * sockaddr_p() const;
socklen_t socklen() const;
socklen_t const * socklen_p() const;
- ///\}
+ //\}
protected:
BSDSocketAddress(socklen_t len, short family);
/** \brief Output generic socket address
This stream operator will output a generic BSDSocketAddress in a family depending format.
-
+
\related BSDSocketAddress
*/
std::ostream & operator<<(std::ostream & os, BSDSocketAddress const & addr);
While BSDSocketAddress provides read-only generic \c sockaddr access,
GenericBSDSocketAddress allows to store (write) arbitrary socket addresses. (It is
- internally based on \c sockaddr_storage).
+ internally based on \c sockaddr_storage).
To access the stored address, use sockaddr_cast to cast the GenericBSDSocketAddress to the
correct family specific address class.
: public BSDSocketAddress
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Structors and default members
- ///@{
+ //\{
GenericBSDSocketAddress();
GenericBSDSocketAddress(BSDSocketAddress const & other);
GenericBSDSocketAddress(const GenericBSDSocketAddress& other);
GenericBSDSocketAddress& operator=(const GenericBSDSocketAddress& other);
-
- ///@}
- ///////////////////////////////////////////////////////////////////////////
+
+ //\}
+ //-////////////////////////////////////////////////////////////////////////
///\name Generic sockaddr interface
- ///\{
+ //\{
struct sockaddr const * sockaddr_p() const;
struct sockaddr * sockaddr_p();
using BSDSocketAddress::socklen_p;
- ///\}
+ //\}
protected:
}
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#include "BSDSocketAddress.cci"
//#include "BSDSocketAddress.ct"
//#include "BSDSocketAddress.cti"