In file socket.hxx:

class OInetSocketAddr : public OSocketAddr

Represents an internet-address

Inheritance:


Public Methods

const char* getDottedAddr ()
virtual TAddrFamily getFamily ()
Queries the socket for its address family
virtual const char* getHostname ()
Converts the address to a (human readable) domain-name
int getPort ()
Delivers the port number of the address
static int getServicePort (const char* pszServiceName, const char* pszProtocolName= "tcp")
Tries to find the port associated with the given service/protocol- pair (e
OInetSocketAddr (oslSocketAddr Addr)
Wraps itself around the osl Socket-Address
OInetSocketAddr (const OInetSocketAddr& sa)
Copy constructor
OInetSocketAddr (const char* pszAddrOrHostName, int Port)
Create a socket address either from a dotted decimal address (e
OInetSocketAddr ()
Creates an empty internet-address (INADDR_ANY)
virtual operator oslSocketAddr ()
Cast Object to the underlying oslSocketAddr
OInetSocketAddr& operator= (const OInetSocketAddr& Addr)
OSocketAddr& operator= (const OSocketAddr& Addr)
Makes a copy of Addr
virtual void operator= (oslSocketAddr Addr)
Wraps itself around the osl Socket-Address
virtual void operator= (oslSocketAddr Addr)
OSocketAddr ()
Creates socket address of unknown type
static oslSocketAddr resolveHostname (const char* pszHostname)
Tries to find an address for a host
Boolean setAddr (const char* pszDottedAddrOrHostname)
Sets the host-part of the address from the dotted-address-form (141
Boolean setPort (int Port)
Sets the port number of the address
virtual ~OSocketAddr ()
destroys underlying oslSocketAddress

Documentation

Represents an internet-address
OSocketAddr()
Creates socket address of unknown type

virtual ~OSocketAddr()
destroys underlying oslSocketAddress

virtual TAddrFamily getFamily()
Queries the socket for its address family
Returns:
the address family of the socket.

virtual operator oslSocketAddr()
Cast Object to the underlying oslSocketAddr

virtual const char* getHostname()
Converts the address to a (human readable) domain-name
Returns:
the hostname represented by the address. On failure returns the empty string.

static oslSocketAddr resolveHostname(const char* pszHostname)
Tries to find an address for a host
Returns:
A new created socket-address or 0 if the name could not be found.

virtual void operator= (oslSocketAddr Addr)
Wraps itself around the osl Socket-Address. The object assumes ownership of the Addr, it will be destroyed by destructor(). If the socket is already attached to an oslSocketAddr, the existing one will be destroyed.

OSocketAddr& operator= (const OSocketAddr& Addr)
Makes a copy of Addr

OInetSocketAddr()
Creates an empty internet-address (INADDR_ANY)

OInetSocketAddr(oslSocketAddr Addr)
Wraps itself around the osl Socket-Address. The object assumes ownership of the Addr, it will be destroyed by ~OInetSocketAddr().

OInetSocketAddr(const char* pszAddrOrHostName, int Port)
Create a socket address either from a dotted decimal address (e.g. 141.99.128.50) or a hostname (e.g. www.stardiv.de).

OInetSocketAddr(const OInetSocketAddr& sa)
Copy constructor

virtual void operator= (oslSocketAddr Addr)

OInetSocketAddr& operator= (const OInetSocketAddr& Addr)

static int getServicePort(const char* pszServiceName, const char* pszProtocolName= "tcp")
Tries to find the port associated with the given service/protocol- pair (e.g. "ftp"/"tcp").
Returns:
the port number in host-byte order or CVOS_PORT_NONE if no service/protocol pair could be found.

int getPort()
Delivers the port number of the address
Returns:
the port in host-byte order or or OSL_INVALID_PORT on errors.

Boolean setPort(int Port)
Sets the port number of the address
Returns:
False if the port couldn't be set (e.g because the address is not of family af_inet).

const char* getDottedAddr()
Returns:
the dotted-address-form (141.99.128.90) of this address. On failure returns the empty string.

Boolean setAddr(const char* pszDottedAddrOrHostname)
Sets the host-part of the address from the dotted-address-form (141.99.128.90) or from a hostname.
Parameters:
pszDottedAddrOrHostname - the address in dotted form or a hostname.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de