PixelLightAPI  .
Public Member Functions
PLCore::SocketAddress Class Reference

Socket address class encapsulating an IP/internet address. More...

#include <SocketAddress.h>

List of all members.

Public Member Functions

PLCORE_API SocketAddress ()
 Constructor.
PLCORE_API SocketAddress (uint32 nPort)
 Constructor.
PLCORE_API SocketAddress (const SocketAddress &cSource)
 Copy constructor.
PLCORE_API SocketAddress (const String &sAddress, uint32 nPort)
 Constructor.
PLCORE_API ~SocketAddress ()
 Destructor.
PLCORE_API String GetHost () const
 Returns the host address.
PLCORE_API void SetHost (const String &sAddress)
 Sets the host address.
PLCORE_API bool SetHostByName (const String &sHostName)
 Sets the host address by using the name of the host.
PLCORE_API uint32 GetPort () const
 Returns the host port number.
PLCORE_API bool SetPort (uint32 nPort)
 Sets the host port number.
PLCORE_API SocketAddressoperator= (const SocketAddress &cSource)
 Copy operator.
PLCORE_API bool operator== (const SocketAddress &cSource) const
 Compare operator.
PLCORE_API bool operator!= (const SocketAddress &cSource) const
 Compare operator.

Detailed Description

Socket address class encapsulating an IP/internet address.


Constructor & Destructor Documentation

PLCORE_API PLCore::SocketAddress::SocketAddress ( uint32  nPort)

Constructor.

Parameters:
[in]nPortNumber of the port to use
PLCORE_API PLCore::SocketAddress::SocketAddress ( const SocketAddress cSource)

Copy constructor.

Parameters:
[in]cSourceSocket address to copy from
PLCORE_API PLCore::SocketAddress::SocketAddress ( const String sAddress,
uint32  nPort 
)

Constructor.

Parameters:
[in]sAddressHost address
[in]nPortNumber of the port to use

Destructor.


Member Function Documentation

PLCORE_API String PLCore::SocketAddress::GetHost ( ) const

Returns the host address.

Returns:
The host address
PLCORE_API void PLCore::SocketAddress::SetHost ( const String sAddress)

Sets the host address.

Parameters:
[in]sAddressNew host address (if empty, set to any host address)
PLCORE_API bool PLCore::SocketAddress::SetHostByName ( const String sHostName)

Sets the host address by using the name of the host.

Parameters:
[in]sHostNameName of the host
Returns:
'true' if all went fine, else 'false'
PLCORE_API uint32 PLCore::SocketAddress::GetPort ( ) const

Returns the host port number.

Returns:
The host port number
PLCORE_API bool PLCore::SocketAddress::SetPort ( uint32  nPort)

Sets the host port number.

Parameters:
[in]nPortNumber of the port to use
Returns:
'true' if all went fine, else 'false'
PLCORE_API SocketAddress& PLCore::SocketAddress::operator= ( const SocketAddress cSource)

Copy operator.

Parameters:
[in]cSourceSocket address to copy from
Returns:
Reference to this socket address
PLCORE_API bool PLCore::SocketAddress::operator== ( const SocketAddress cSource) const

Compare operator.

Parameters:
[in]cSourceSocket address to compare with
Returns:
'true' if both socket addresses are equal, else 'false'
PLCORE_API bool PLCore::SocketAddress::operator!= ( const SocketAddress cSource) const

Compare operator.

Parameters:
[in]cSourceSocket address to compare with
Returns:
'true' if both socket addresses are not equal, else 'false'

The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:15
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported