libassa 3.5.1
Loading...
Searching...
No Matches
UNIXAddress.h
Go to the documentation of this file.
1// -*- c++ -*-
2//------------------------------------------------------------------------------
3// UNIXAddress.h
4//------------------------------------------------------------------------------
5// Copyright (c) 1999 by Vladislav Grinchenko
6//
7// This library is free software; you can redistribute it and/or
8// modify it under the terms of the GNU Library General Public
9// License as published by the Free Software Foundation; either
10// version 2 of the License, or (at your option) any later version.
11//------------------------------------------------------------------------------
12// Created: 03/22/99
13//------------------------------------------------------------------------------
14#ifndef UNIX_ADDRESS_H
15#define UNIX_ADDRESS_H
16
17#if !defined(WIN32)
18
19#include "assa/Address.h"
20
21namespace ASSA {
22
28class UNIXAddress : public Address {
29public:
33 UNIXAddress (const char * socket_name_);
34
39
41 virtual ~UNIXAddress ();
42
44 const int getLength () const;
45
47 SA* getAddress () const;
48
49private:
52};
53
54inline
56~UNIXAddress () { trace("UNIXAddress::~UNIXAddress"); }
57
58inline const int
60getLength () const { return sizeof (m_address); }
61
62inline SA*
64getAddress () const { return (SA*) &m_address; }
65
66} // end namespace ASSA
67
68#endif /* !defined WIN32 */
69
70#endif /* UNIX_ADDRESS_H */
Address is an abstraction for INET or UNIX-domain address data type.
#define trace(s)
trace() is used to trace function call chain in C++ program.
Definition Logger.h:429
A wrapper class to provide AutoPtr with reference semantics.
Definition AutoPtr.h:32
const int getLength() const
Retrieve address length.
Definition UNIXAddress.h:60
SA * getAddress() const
Retrieve underlying address structure.
Definition UNIXAddress.h:64
SA_UN m_address
UNIX socket address structure.
Definition UNIXAddress.h:51
virtual ~UNIXAddress()
Destructor.
Definition UNIXAddress.h:56
struct sockaddr SA
Definition Address.h:33