RTP Trace System  1.0
Coral::SocketAddress Class Reference

Socket Address. More...

#include <socketaddress.h>

Inheritance diagram for Coral::SocketAddress:
Coral::InternetAddress Coral::UnixAddress Coral::InternetFlow

List of all members.

Public Member Functions

virtual void reset ()=0
virtual bool isValid () const =0
virtual String getAddressString () const =0
virtual cardinal getSystemAddress (sockaddr *buffer, const socklen_t length, const cardinal type) const =0
virtual bool setSystemAddress (sockaddr *address, const socklen_t length)=0

Static Public Attributes

static const cardinal MaxSockLen

Detailed Description

Socket Address.

This class is an interface for a socket address.

Author:
Thomas Dreibholz
Version:
1.0

Member Function Documentation

virtual String Coral::SocketAddress::getAddressString ( ) const [pure virtual]

Get address string.

Returns:
Address string.

Implemented in Coral::InternetAddress, Coral::UnixAddress, and Coral::InternetFlow.

virtual cardinal Coral::SocketAddress::getSystemAddress ( sockaddr *  buffer,
const socklen_t  length,
const cardinal  type 
) const [pure virtual]

Get system's sockaddr structure for the address.

Parameters:
bufferBuffer to write sockaddr to.
lengthLength of buffer.
typeAF_INET or AF_INET6.
Returns:
Length of written sockaddr structure.

Implemented in Coral::InternetAddress, and Coral::InternetFlow.

virtual bool Coral::SocketAddress::isValid ( ) const [pure virtual]

Check, if address is valid.

Returns:
true, if address is valid; false otherwise.

Implemented in Coral::InternetAddress, and Coral::UnixAddress.

virtual void Coral::SocketAddress::reset ( ) [pure virtual]

Reset address.

Implemented in Coral::InternetAddress, Coral::UnixAddress, and Coral::InternetFlow.

virtual bool Coral::SocketAddress::setSystemAddress ( sockaddr *  address,
const socklen_t  length 
) [pure virtual]

Initialize the internet address from the system's sockaddr structure. The sockaddr structure may be sockaddr_in (AF_INET) or sockaddr_in6 (AF_INET6).

Parameters:
addresssockaddr.
lengthLength of sockaddr (sizeof(sockaddr_in) or sizeof(sockaddr_in6)).

Implemented in Coral::InternetAddress, and Coral::InternetFlow.


Member Data Documentation

Initial value:
      (sizeof(sockaddr_un) > sizeof(sockaddr_storage)) ? sizeof(sockaddr_un) : sizeof(sockaddr_storage)

Maximum sockaddr length in bytes.


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