# OpalListenerIP Class Reference

`#include <transports.h>`

Inheritance diagram for OpalListenerIP:

[legend]
Collaboration diagram for OpalListenerIP:
[legend]

## Public Member Functions

Construction
| OpalListenerIP (OpalEndPoint &endpoint, PIPSocket::Address binding=PIPSocket::GetDefaultIpAny(), WORD port=0, PBoolean exclusive=true)
| OpalListenerIP (OpalEndPoint &endpoint, const OpalTransportAddress &binding, OpalTransportAddress::BindOptions option)
Overrides from OpalListener
virtual OpalTransportAddress | GetLocalAddress (const OpalTransportAddress &remoteAddress=OpalTransportAddress()) const
Operations
WORD | GetListenerPort () const
virtual const PCaselessString & | GetProtoPrefix () const =0

## Protected Member Functions

bool | CanCreateTransport (const OpalTransportAddress &localAddress, const OpalTransportAddress &remoteAddress) const

## Protected Attributes

PIPSocket::Address | localAddress
WORD | listenerPort
bool | exclusiveListener

## Constructor & Destructor Documentation

OpalListenerIP::OpalListenerIP | ( | OpalEndPoint & | endpoint,
|  | PIPSocket::Address | binding = `PIPSocket::GetDefaultIpAny()`,
|  | WORD | port = `0`,
|  | PBoolean | exclusive = `true` |
| ) |  |  |

Create a new IP listener.

Parameters:

  endpoint | Endpoint listener is used for
  binding | Local interface to listen on
  port | TCP port to listen for connections
  exclusive | Exclusive listening mode, no other process can accept on the port

OpalListenerIP::OpalListenerIP | ( | OpalEndPoint & | endpoint,
|  | const OpalTransportAddress & | binding,
|  | OpalTransportAddress::BindOptions | option |
| ) |  |  |

Parameters:

  endpoint | Endpoint listener is used for
  binding | Local interface to listen on
  option | OPtions for binding

## Member Function Documentation

bool OpalListenerIP::CanCreateTransport | ( | const OpalTransportAddress & | localAddress,
|  | const OpalTransportAddress & | remoteAddress |
| ) |  |  | const`[protected]`

WORD OpalListenerIP::GetListenerPort | ( |  | ) | const`[inline]`

virtual OpalTransportAddress OpalListenerIP::GetLocalAddress | ( | const OpalTransportAddress & | remoteAddress = `OpalTransportAddress()` | ) | const`[virtual]`

Get the local transport address on which this listener may be accessed. If remoteAddress is present and is an address that requires NAT for connectivity, then the returned address is adjusted to return the external address and port.

Implements OpalListener.

Reimplemented in OpalListenerUDP.

virtual const PCaselessString& OpalListenerIP::GetProtoPrefix | ( |  | ) | const`[pure virtual]`

Implemented in OpalListenerTCP, and OpalListenerUDP.

## Field Documentation

bool OpalListenerIP::exclusiveListener `[protected]`

WORD OpalListenerIP::listenerPort `[protected]`

PIPSocket::Address OpalListenerIP::localAddress `[protected]`

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

- transports.h