H323ListenerTCP Class Reference

#include <transports.h>

Inheritance diagram for H323ListenerTCP:

H323Listener List of all members.

Public Member Functions

 H323ListenerTCP (H323EndPoint &endpoint, PIPSocket::Address binding, WORD port, BOOL exclusive=FALSE)
 ~H323ListenerTCP ()
virtual BOOL Open ()
virtual BOOL Close ()
virtual H323TransportAccept (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

Detailed Description

This class manages H323 connections using TCP/IP transport.

Definition at line 731 of file transports.h.


Constructor & Destructor Documentation

H323ListenerTCP::H323ListenerTCP ( H323EndPoint endpoint,
PIPSocket::Address  binding,
WORD  port,
BOOL  exclusive = FALSE 
)

Create a new listener for the TCP/IP protocol.

Parameters:
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

Definition at line 1418 of file transports.cxx.

References exclusiveListener.

H323ListenerTCP::~H323ListenerTCP (  ) 

Destroy the listener thread.

Definition at line 1430 of file transports.cxx.

References Close().


Member Function Documentation

BOOL H323ListenerTCP::Open (  )  [virtual]

Open the listener.

Implements H323Listener.

Definition at line 1436 of file transports.cxx.

References exclusiveListener, listener, and localAddress.

BOOL H323ListenerTCP::Close (  )  [virtual]

Stop the listener thread and no longer accept incoming connections.

Implements H323Listener.

Definition at line 1449 of file transports.cxx.

References listener.

Referenced by ~H323ListenerTCP().

H323Transport * H323ListenerTCP::Accept ( const PTimeInterval &  timeout  )  [virtual]

Accept a new incoming transport.

Parameters:
timeout  Time to wait for incoming connection

Implements H323Listener.

Definition at line 1462 of file transports.cxx.

References H323Listener::endpoint, GetTransportAddress(), and listener.

Referenced by Main().

H323TransportAddress H323ListenerTCP::GetTransportAddress (  )  const [virtual]

Get the local transport address on which this listener may be accessed.

Implements H323Listener.

Definition at line 1491 of file transports.cxx.

References listener, and localAddress.

Referenced by Accept(), and SetUpTransportPDU().

BOOL H323ListenerTCP::SetUpTransportPDU ( H245_TransportAddress pdu,
const H323Transport associatedTransport 
) [virtual]

Set up a transport address PDU for bidirectional logical channels.

Parameters:
pdu  Transport addresses listening on
associatedTransport  Associated transport for precendence and translation

Implements H323Listener.

Definition at line 1497 of file transports.cxx.

References H323TransportAddress::GetIpAddress(), H323Transport::GetLocalAddress(), GetTransportAddress(), listener, localAddress, and H323TransportAddress::SetPDU().

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.

Definition at line 1513 of file transports.cxx.

References Accept(), H323Listener::endpoint, and listener.


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 13:45:29 2007 for h323plus by  doxygen 1.5.2