libassa
3.5.1
assa
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
21
namespace
ASSA
{
22
28
class
UNIXAddress
:
public
Address
{
29
public
:
33
UNIXAddress
(
const
char
* socket_name_);
34
38
UNIXAddress
(
SA
* socket_address_);
39
41
virtual
~UNIXAddress
();
42
44
const
int
getLength
()
const
;
45
47
SA
*
getAddress
()
const
;
48
49
private
:
51
SA_UN
m_address
;
52
};
53
54
inline
55
UNIXAddress::
56
~UNIXAddress
() {
trace
(
"UNIXAddress::~UNIXAddress"
); }
57
58
inline
const
int
59
UNIXAddress::
60
getLength
()
const
{
return
sizeof
(
m_address
); }
61
62
inline
SA
*
63
UNIXAddress::
64
getAddress
()
const
{
return
(
SA
*) &
m_address
; }
65
66
}
// end namespace ASSA
67
68
#endif
/* !defined WIN32 */
69
70
#endif
/* UNIX_ADDRESS_H */
ASSA::UNIXAddress
Definition:
UNIXAddress.h:28
ASSA::SA_UN
struct sockaddr_un SA_UN
Definition:
Address.h:44
ASSA::UNIXAddress::getAddress
SA * getAddress() const
Retrieve underlying address structure.
Definition:
UNIXAddress.h:64
ASSA::UNIXAddress::~UNIXAddress
virtual ~UNIXAddress()
Destructor.
Definition:
UNIXAddress.h:56
ASSA::SA
struct sockaddr SA
Definition:
Address.h:33
ASSA::UNIXAddress::m_address
SA_UN m_address
UNIX socket address structure.
Definition:
UNIXAddress.h:51
ASSA::UNIXAddress::getLength
const int getLength() const
Retrieve address length.
Definition:
UNIXAddress.h:60
trace
#define trace(s)
Definition:
Logger.h:429
Address.h
ASSA::UNIXAddress::UNIXAddress
UNIXAddress(const char *socket_name_)
Constructor.
Definition:
UNIXAddress.cpp:22
ASSA
Definition:
Acceptor.h:40
ASSA::Address
Definition:
Address.h:51
Generated by
1.8.17