class SocketAddress

Socket Address. More...

Contains pure virtuals
Full nameCoral::SocketAddress
Definition#include <socketaddress.h>
Inherited byInternetAddress, InternetFlow, UnixAddress
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

This class is an interface for a socket address.

void  reset ()

[pure virtual]

Reset address.

bool  isValid ()

[const pure virtual]

Check, if address is valid.

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

String  getAddressString ()

[const pure virtual]

Get address string.

Returns: Address string.

cardinal  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.

bool  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)).

static const cardinal MaxSockLen

Maximum sockaddr length in bytes.