Loading...
Searching...
No Matches
UNIXAddress.h
Go to the documentation of this file.
// -*- c++ -*-
//------------------------------------------------------------------------------
// UNIXAddress.h
//------------------------------------------------------------------------------
// Copyright (c) 1999 by Vladislav Grinchenko
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//------------------------------------------------------------------------------
// Created: 03/22/99
//------------------------------------------------------------------------------
#ifndef UNIX_ADDRESS_H
#define UNIX_ADDRESS_H
#if !defined(WIN32)
#include "assa/Address.h"
namespace ASSA {
class UNIXAddress : public Address {
public:
UNIXAddress (const char * socket_name_);
UNIXAddress (SA* socket_address_);
virtual ~UNIXAddress ();
const int getLength () const;
SA* getAddress () const;
private:
SA_UN m_address;
};
inline
UNIXAddress::
~UNIXAddress () { trace("UNIXAddress::~UNIXAddress"); }
inline const int
UNIXAddress::
getLength () const { return sizeof (m_address); }
inline SA*
UNIXAddress::
getAddress () const { return (SA*) &m_address; }
} // end namespace ASSA
#endif /* !defined WIN32 */
#endif /* UNIX_ADDRESS_H */
Address.h
Address is an abstraction for INET or UNIX-domain address data type.
trace
#define trace(s)
trace() is used to trace function call chain in C++ program.
Definition Logger.h:429
ASSA::Address::Address
Address()
Constructor.
Definition Address.h:65
ASSA::UNIXAddress::getLength
const int getLength() const
Retrieve address length.
Definition UNIXAddress.h:60
ASSA::UNIXAddress::getAddress
SA * getAddress() const
Retrieve underlying address structure.
Definition UNIXAddress.h:64
ASSA::UNIXAddress::m_address
SA_UN m_address
UNIX socket address structure.
Definition UNIXAddress.h:51
ASSA::UNIXAddress::~UNIXAddress
virtual ~UNIXAddress()
Destructor.
Definition UNIXAddress.h:56
ASSA::UNIXAddress::UNIXAddress
UNIXAddress(const char *socket_name_)
Constructor.
Definition UNIXAddress.cpp:22
ASSA
Definition Acceptor.h:40
ASSA::SA_UN
struct sockaddr_un SA_UN
Definition Address.h:44
ASSA::SA
struct sockaddr SA
Definition Address.h:33