OPAL  Version 3.14.3
OpalListenerIP Class Referenceabstract

#include <transports.h>

Inheritance diagram for OpalListenerIP:
Collaboration diagram for OpalListenerIP:

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
 
- Public Member Functions inherited from OpalListener
 OpalListener (OpalEndPoint &endpoint)
 
void PrintOn (ostream &strm) const
 
virtual bool Open (const AcceptHandler &acceptHandler, ThreadMode mode=SpawnNewThreadMode)
 
virtual bool IsOpen () const =0
 
virtual void Close ()=0
 
virtual OpalTransportAccept (const PTimeInterval &timeout)=0
 
virtual OpalTransportCreateTransport (const OpalTransportAddress &localAddress, const OpalTransportAddress &remoteAddress) const =0
 
void CloseWait ()
 
void CleanUpOnTermination ()
 

Protected Member Functions

bool CanCreateTransport (const OpalTransportAddress &localAddress, const OpalTransportAddress &remoteAddress) const
 
- Protected Member Functions inherited from OpalListener
void ListenForConnections ()
 
void TransportThreadMain (OpalTransportPtr transport)
 

Protected Attributes

PIPSocketAddressAndPort m_binding
 
bool m_exclusiveListener
 
- Protected Attributes inherited from OpalListener
OpalEndPointm_endpoint
 
PThread * m_thread
 
AcceptHandler m_acceptHandler
 
ThreadMode m_threadMode
 

Additional Inherited Members

- Public Types inherited from OpalListener
enum  ThreadMode { SpawnNewThreadMode, HandOffThreadMode, SingleThreadMode }
 
typedef PNotifierTemplate
< const OpalTransportPtr & > 
AcceptHandler
 

Constructor & Destructor Documentation

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

Create a new IP listener.

Parameters
endpointEndpoint listener is used for
bindingLocal interface to listen on
portTCP port to listen for connections
exclusiveExclusive listening mode, no other process can accept on the port
OpalListenerIP::OpalListenerIP ( OpalEndPoint endpoint,
const OpalTransportAddress binding,
OpalTransportAddress::BindOptions  option 
)
Parameters
endpointEndpoint listener is used for
bindingLocal interface to listen on
optionOPtions for binding

Member Function Documentation

bool OpalListenerIP::CanCreateTransport ( const OpalTransportAddress localAddress,
const OpalTransportAddress remoteAddress 
) const
protected
WORD OpalListenerIP::GetListenerPort ( ) const
inline

References m_binding.

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 OpalListenerUDP, and OpalListenerTCP.

Field Documentation

PIPSocketAddressAndPort OpalListenerIP::m_binding
protected

Referenced by GetListenerPort().

bool OpalListenerIP::m_exclusiveListener
protected

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