PTLib  Version 2.10.11
PIPSocketAddressAndPort Class Reference

#include <ipsock.h>

Public Member Functions

 PIPSocketAddressAndPort ()
 
 PIPSocketAddressAndPort (char separator)
 
 PIPSocketAddressAndPort (const PString &str, WORD defaultPort=0, char separator=':')
 
PBoolean Parse (const PString &str, WORD defaultPort=0, char separator=':')
 
PString AsString (char separator=0) const
 
void SetAddress (const PIPSocket::Address &addr, WORD port=0)
 
const PIPSocket::AddressGetAddress () const
 
WORD GetPort () const
 
void SetPort (WORD port)
 
bool IsValid () const
 

Protected Attributes

PIPSocket::Address m_address
 
WORD m_port
 
char m_separator
 

Friends

ostream & operator<< (ostream &strm, const PIPSocketAddressAndPort &ap)
 

Constructor & Destructor Documentation

§ PIPSocketAddressAndPort() [1/3]

PIPSocketAddressAndPort::PIPSocketAddressAndPort ( )
inline

§ PIPSocketAddressAndPort() [2/3]

PIPSocketAddressAndPort::PIPSocketAddressAndPort ( char  separator)
inline

§ PIPSocketAddressAndPort() [3/3]

PIPSocketAddressAndPort::PIPSocketAddressAndPort ( const PString str,
WORD  defaultPort = 0,
char  separator = ':' 
)
inline

Member Function Documentation

§ AsString()

PString PIPSocketAddressAndPort::AsString ( char  separator = 0) const
inline

References PSocket::port, and PString::Unsigned.

§ GetAddress()

const PIPSocket::Address& PIPSocketAddressAndPort::GetAddress ( ) const
inline

§ GetPort()

WORD PIPSocketAddressAndPort::GetPort ( ) const
inline

§ IsValid()

bool PIPSocketAddressAndPort::IsValid ( ) const
inline

§ Parse()

PBoolean PIPSocketAddressAndPort::Parse ( const PString str,
WORD  defaultPort = 0,
char  separator = ':' 
)

§ SetAddress()

void PIPSocketAddressAndPort::SetAddress ( const PIPSocket::Address addr,
WORD  port = 0 
)

§ SetPort()

void PIPSocketAddressAndPort::SetPort ( WORD  port)
inline

References PSocket::port.

Friends And Related Function Documentation

§ operator<<

ostream& operator<< ( ostream &  strm,
const PIPSocketAddressAndPort ap 
)
friend

Member Data Documentation

§ m_address

PIPSocket::Address PIPSocketAddressAndPort::m_address
protected

§ m_port

WORD PIPSocketAddressAndPort::m_port
protected

§ m_separator

char PIPSocketAddressAndPort::m_separator
protected

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