RTP Audio System
2.0.0
|
Packet Address. More...
#include <packetaddress.h>
Public Member Functions | |
PacketAddress () | |
PacketAddress (const PacketAddress &address) | |
PacketAddress (const String &name) | |
PacketAddress (const sockaddr *address, cardinal length) | |
~PacketAddress () | |
void | reset () |
SocketAddress * | duplicate () const |
void | init (const PacketAddress &address) |
void | init (const String &name) |
PacketAddress & | operator= (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 |
Packet Address.
This class manages a packet socket address.
Constructor for an empty packet address.
PacketAddress::PacketAddress | ( | const PacketAddress & | address | ) |
Constructor for an packet address from an packet address.
address | Packet address. |
PacketAddress::PacketAddress | ( | const String & | name | ) |
Constructor for a packet address given by a string. Examples: "/tmp/test.socket".
name | Address string. |
PacketAddress::PacketAddress | ( | const sockaddr * | address, |
cardinal | length | ||
) |
Constructor for a packet address from the system's sockaddr structure.
address | sockaddr. |
length | Length of sockaddr. |
Destructor.
SocketAddress * PacketAddress::duplicate | ( | ) | const [virtual] |
duplicate() implementation of SocketAddress.
Implements SocketAddress.
String PacketAddress::getAddressString | ( | const cardinal | format = PF_Default | ) | const [virtual] |
getAddressString() implementation of SocketAddress.
Implements SocketAddress.
integer PacketAddress::getFamily | ( | ) | const [virtual] |
getFamily() implementation of SocketAddress.
Implements SocketAddress.
card16 PacketAddress::getPort | ( | ) | const [virtual] |
getPort() implementation of SocketAddress.
Implements SocketAddress.
cardinal PacketAddress::getSystemAddress | ( | sockaddr * | buffer, |
const socklen_t | length, | ||
const cardinal | type | ||
) | const [virtual] |
getSystemAddress() implementation of SocketAddress
Implements SocketAddress.
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.
bool PacketAddress::isValid | ( | ) | const [virtual] |
isValid() implementation of SocketAddress.
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.
Implements SocketAddress.
bool PacketAddress::setSystemAddress | ( | const sockaddr * | address, |
const socklen_t | length | ||
) | [virtual] |
setSystemAddress() implementation of SocketAddress.
Implements SocketAddress.
const cardinal PacketAddress::MaxNameLength = IFNAMSIZ - 1 [static, private] |
char PacketAddress::Name[MaxNameLength+1] [private] |