PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
PIPSocket::AddressAndPort Class Reference

A class describing an IP address and port number combination. More...

`#include <ipsock.h>`

Collaboration diagram for PIPSocket::AddressAndPort:
[legend]

## Public Member Functions
| AddressAndPort (char separator= ':')
| AddressAndPort (WORD defaultPort, char separator= ':')
| AddressAndPort (const PString &str, WORD defaultPort=0, char separator= ':', const char *proto=NULL)
| AddressAndPort (const PIPSocket::Address &addr, WORD defaultPort=0, char separator= ':')
| AddressAndPort (struct sockaddr *ai_addr, const int ai_addrlen)
bool | Parse (const PString &str, WORD defaultPort=0, char separator= ':', const char *proto=NULL)
PString | AsString (char separator=0) const
const PIPSocket::Address & | GetAddress () const
void | SetAddress (const PIPSocket::Address &addr, WORD port=0)
WORD | GetPort () const
void | SetPort (WORD port)
bool | IsValid () const
bool | operator== (const AddressAndPort &obj) const
bool | operator!= (const AddressAndPort &obj) const
bool | MatchWildcard (const AddressAndPort &wild) const

## Protected Attributes
PIPSocket::Address | m_address
WORD | m_port
char | m_separator

## Friends
ostream & | operator<< (ostream &strm, const AddressAndPort &ap)

## Detailed Description

A class describing an IP address and port number combination.

## Constructor & Destructor Documentation

PIPSocket::AddressAndPort::AddressAndPort | ( | char | separator = `':'` | ) |

PIPSocket::AddressAndPort::AddressAndPort | ( | WORD | defaultPort,
|  | char | separator = `':'`
| ) |  |

PIPSocket::AddressAndPort::AddressAndPort | ( | const PString & | str,
|  | WORD | defaultPort = `0`,
|  | char | separator = `':'`,
|  | const char * | proto = `NULL`
| ) |  |

PIPSocket::AddressAndPort::AddressAndPort | ( | const PIPSocket::Address & | addr,
|  | WORD | defaultPort = `0`,
|  | char | separator = `':'`
| ) |  |

PIPSocket::AddressAndPort::AddressAndPort | ( | struct sockaddr * | ai_addr,
|  | const int | ai_addrlen
| ) |  |

## Member Function Documentation

PString PIPSocket::AddressAndPort::AsString | ( | char | separator = `0` | ) | const

const PIPSocket::Address& PIPSocket::AddressAndPort::GetAddress | ( |  | ) | const
| inline

References m_address.

WORD PIPSocket::AddressAndPort::GetPort | ( |  | ) | const
| inline

References m_port.

bool PIPSocket::AddressAndPort::IsValid | ( |  | ) | const
| inline

References PIPSocket::Address::IsValid(), m_address, and m_port.

bool PIPSocket::AddressAndPort::MatchWildcard | ( | const AddressAndPort & | wild | ) | const

bool PIPSocket::AddressAndPort::operator!= | ( | const AddressAndPort & | obj | ) | const
| inline

References m_address, and m_port.

bool PIPSocket::AddressAndPort::operator== | ( | const AddressAndPort & | obj | ) | const
| inline

References m_address, and m_port.

bool PIPSocket::AddressAndPort::Parse | ( | const PString & | str,
|  | WORD | defaultPort = `0`,
|  | char | separator = `':'`,
|  | const char * | proto = `NULL`
| ) |  |

void PIPSocket::AddressAndPort::SetAddress | ( | const PIPSocket::Address & | addr,
|  | WORD | port = `0`
| ) |  |

void PIPSocket::AddressAndPort::SetPort | ( | WORD | port | ) |
| inline

References m_port, and PSocket::port.

## Friends And Related Function Documentation

ostream& operator<< | ( | ostream & | strm,
|  | const AddressAndPort & | ap
| ) |  |
| friend

## Member Data Documentation

PIPSocket::Address PIPSocket::AddressAndPort::m_address
| protected

Referenced by GetAddress(), IsValid(), operator!=(), and operator==().

WORD PIPSocket::AddressAndPort::m_port
| protected

Referenced by GetPort(), IsValid(), operator!=(), operator==(), and SetPort().

char PIPSocket::AddressAndPort::m_separator
| protected

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

- ipsock.h