-// $Id$
-//
// Copyright (C) 2007
+// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Kompetenzzentrum NETwork research (NET)
+// David Wagner <david.wagner@fokus.fraunhofer.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
#include "../../../Socket/ClientSocketHandle.hh"
#include "../../../Socket/CommunicationPolicy.hh"
#include "../../../Socket/Protocols/GenericAddressingPolicy.hh"
+#include "../../../Utils/safe_bool.hh"
#include "UNAddress.hh"
//#include "UNAddressing.mpp"
namespace senf {
/** \brief Unix domain socket address
- UNSocketAddress wraps the standard sockaddr_in datatype. It provides simple accessor methods
+ UNSocketAddress wraps the standard sockaddr_un datatype. It provides simple accessor methods
to access the path.
\implementation This implementation is based on sockaddr_un.
\ingroup addr_group
*/
class UNSocketAddress
- : public ComparableSafeBool<UNSocketAddress>
+ : public comparable_safe_bool<UNSocketAddress>
{
public:
///< Construct an address constant from given path
static UNSocketAddress from_string(std::string const s); ///< Create UNSocketAddress from string
static UNSocketAddress from_path(boost::filesystem::path const p); ///< Create UNSocketAddress from path
- static std::string path(); ///< Return path as string
- static sockaddr_un sockaddr();
-
- struct sockaddr * sockaddr_p();
+ std::string path() const ; ///< Return path as string
+ struct sockaddr_un sockaddr();
+ struct sockaddr * sockaddr_p() ;
struct sockaddr const * sockaddr_p() const;
unsigned sockaddr_len() const;
private:
- static struct sockaddr_un sockAddr;
+ struct sockaddr_un sockAddr;
};
/** \brief Write path os
GenericAddressingPolicy which see for a detailed
documentation.
*/
-
struct UNAddressingPolicy
: public AddressingPolicyBase,
private GenericAddressingPolicy<UNSocketAddress>