OpenH323 1.18.0
|
#include <transports.h>
Public Member Functions | |
H323ListenerTCP (H323EndPoint &endpoint, PIPSocket::Address binding, WORD port, BOOL exclusive=FALSE) | |
~H323ListenerTCP () | |
virtual BOOL | Open () |
virtual BOOL | Close () |
virtual H323Transport * | Accept (const PTimeInterval &timeout) |
virtual H323TransportAddress | GetTransportAddress () const |
virtual BOOL | SetUpTransportPDU (H245_TransportAddress &pdu, const H323Transport &associatedTransport) |
WORD | GetListenerPort () const |
Protected Member Functions | |
virtual void | Main () |
Protected Attributes | |
PTCPSocket | listener |
PIPSocket::Address | localAddress |
BOOL | exclusiveListener |
This class manages H323 connections using TCP/IP transport.
H323ListenerTCP::H323ListenerTCP | ( | H323EndPoint & | endpoint, |
PIPSocket::Address | binding, | ||
WORD | port, | ||
BOOL | exclusive = FALSE |
||
) |
Create a new listener for the TCP/IP protocol.
endpoint | Endpoint instance for channel |
binding | Local interface to listen on |
port | TCP port to listen for connections |
exclusive | Fail if listener port in use |
H323ListenerTCP::~H323ListenerTCP | ( | ) |
Destroy the listener thread.
virtual H323Transport* H323ListenerTCP::Accept | ( | const PTimeInterval & | timeout | ) | [virtual] |
Accept a new incoming transport.
timeout | Time to wait for incoming connection |
Implements H323Listener.
virtual BOOL H323ListenerTCP::Close | ( | ) | [virtual] |
Stop the listener thread and no longer accept incoming connections.
Implements H323Listener.
WORD H323ListenerTCP::GetListenerPort | ( | ) | const [inline] |
References listener.
virtual H323TransportAddress H323ListenerTCP::GetTransportAddress | ( | ) | const [virtual] |
Get the local transport address on which this listener may be accessed.
Implements H323Listener.
virtual void H323ListenerTCP::Main | ( | ) | [protected, virtual] |
Handle incoming H.323 connections and dispatch them in new threads based on the H323Transport class. This is defined in the descendent class that knows what the low level transport is, eg H323ListenerIP for the TCP/IP protocol.
Note this function does not return until the Close() function is called or there is some other error.
virtual BOOL H323ListenerTCP::Open | ( | ) | [virtual] |
Open the listener.
Implements H323Listener.
virtual BOOL H323ListenerTCP::SetUpTransportPDU | ( | H245_TransportAddress & | pdu, |
const H323Transport & | associatedTransport | ||
) | [virtual] |
Set up a transport address PDU for bidirectional logical channels.
pdu | Transport addresses listening on |
associatedTransport | Associated transport for precendence and translation |
Implements H323Listener.
BOOL H323ListenerTCP::exclusiveListener [protected] |
PTCPSocket H323ListenerTCP::listener [protected] |
Referenced by GetListenerPort().
PIPSocket::Address H323ListenerTCP::localAddress [protected] |