RTP Audio System  2.0.0
PacketAddress Class Reference

Packet Address. More...

#include <packetaddress.h>

Inheritance diagram for PacketAddress:
SocketAddress

List of all members.

Public Member Functions

 PacketAddress ()
 PacketAddress (const PacketAddress &address)
 PacketAddress (const String &name)
 PacketAddress (const sockaddr *address, cardinal length)
 ~PacketAddress ()
void reset ()
SocketAddressduplicate () const
void init (const PacketAddress &address)
void init (const String &name)
PacketAddressoperator= (const PacketAddress &source)
bool isValid () const
integer getFamily () const
String getAddressString (const cardinal format=PF_Default) const
bool isNull () const
card16 getPort () const
void setPort (const card16 port)
cardinal getSystemAddress (sockaddr *buffer, const socklen_t length, const cardinal type) const
bool setSystemAddress (const sockaddr *address, const socklen_t length)
int operator== (const PacketAddress &address) const
int operator!= (const PacketAddress &address) const
int operator< (const PacketAddress &address) const
int operator<= (const PacketAddress &address) const
int operator> (const PacketAddress &address) const
int operator>= (const PacketAddress &address) const

Private Attributes

char Name [MaxNameLength+1]

Static Private Attributes

static const cardinal MaxNameLength = IFNAMSIZ - 1

Detailed Description

Packet Address.

This class manages a packet socket address.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

Constructor for an empty packet address.

Constructor for an packet address from an packet address.

Parameters:
addressPacket address.

Constructor for a packet address given by a string. Examples: "/tmp/test.socket".

Parameters:
nameAddress string.
PacketAddress::PacketAddress ( const sockaddr *  address,
cardinal  length 
)

Constructor for a packet address from the system's sockaddr structure.

Parameters:
addresssockaddr.
lengthLength of sockaddr.

Member Function Documentation

SocketAddress * PacketAddress::duplicate ( ) const [virtual]

duplicate() implementation of SocketAddress.

See also:
SocketAddress::duplicate

Implements SocketAddress.

String PacketAddress::getAddressString ( const cardinal  format = PF_Default) const [virtual]

getAddressString() implementation of SocketAddress.

See also:
SocketAddress::getAddress

Implements SocketAddress.

integer PacketAddress::getFamily ( ) const [virtual]

getFamily() implementation of SocketAddress.

See also:
SocketAddress::getFamily

Implements SocketAddress.

card16 PacketAddress::getPort ( ) const [virtual]

getPort() implementation of SocketAddress.

See also:
SocketAddress::getPort

Implements SocketAddress.

cardinal PacketAddress::getSystemAddress ( sockaddr *  buffer,
const socklen_t  length,
const cardinal  type 
) const [virtual]
void PacketAddress::init ( const PacketAddress address)

Initialize packet address from packet address.

void PacketAddress::init ( const String name)

Initialize packet address from socket name.

bool PacketAddress::isNull ( ) const [inline]

Check, if the address is null.

Returns:
true, if the address is not null; false otherwise.
bool PacketAddress::isValid ( ) const [virtual]

isValid() implementation of SocketAddress.

See also:
SocketAddress::isValid

Implements SocketAddress.

int PacketAddress::operator!= ( const PacketAddress address) const [inline]

Implementation of != operator.

int PacketAddress::operator< ( const PacketAddress address) const

Implementation of < operator.

int PacketAddress::operator<= ( const PacketAddress address) const [inline]

Implementation of <= operator.

PacketAddress& PacketAddress::operator= ( const PacketAddress source) [inline]

Implementation of = operator.

int PacketAddress::operator== ( const PacketAddress address) const

Implementation of == operator.

int PacketAddress::operator> ( const PacketAddress address) const

Implementation of > operator.

int PacketAddress::operator>= ( const PacketAddress address) const [inline]

Implementation of >= operator.

void PacketAddress::reset ( ) [virtual]

Reset packet address.

Implements SocketAddress.

void PacketAddress::setPort ( const card16  port) [virtual]

setPort() implementation of SocketAddress.

See also:
SocketAddress::setPort

Implements SocketAddress.

bool PacketAddress::setSystemAddress ( const sockaddr *  address,
const socklen_t  length 
) [virtual]

Member Data Documentation

const cardinal PacketAddress::MaxNameLength = IFNAMSIZ - 1 [static, private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines