class H323Transport

This class describes a I/O transport protocol.

Inheritance:


Public Methods

[more] Construction
[more] Operations
[more] Signalling Channel
[more] Control Channel
[more] RAS Channel
[more] Member variable access

Protected Fields

[more]PThread* thread
Endpoint that owns the listener
[more] Thread handling the transport


Documentation

This class describes a I/O transport protocol. A "transport" is an object that listens for incoming connections on the particular transport.
o Construction

o H323Transport(H323EndPoint & endpoint)
Create a new transport channel

o Overrides from PObject

o Operations

ovirtual H323TransportAddress GetLocalAddress() const = 0
Get the transport address of the local endpoint

ovirtual H323TransportAddress GetRemoteAddress() const = 0
Get the transport address of the remote endpoint

ovirtual BOOL SetRemoteAddress( const H323TransportAddress & address ) = 0
Set remote address to connect to. Note that this does not necessarily initiate a transport level connection, but only indicates where to connect to. The actual connection is made by the Connect() function.

ovirtual BOOL Connect() = 0
Connect to the remote address

oBOOL ConnectTo( const H323TransportAddress & address )
Connect to the specified address

ovirtual BOOL Close()
Close the channel

ovirtual BOOL IsCompatibleTransport( const H225_TransportAddress & pdu ) const
Check that the transport address PDU is compatible with transport

ovirtual void SetUpTransportPDU( H225_TransportAddress & pdu, BOOL localTsap ) const
Set up a transport address PDU for RAS channel

ovirtual void SetUpTransportPDU( H245_TransportAddress & pdu, unsigned tsap ) const
Set up a transport address PDU for logical channel. If tsap is UseLocalTSAP or UseRemoteTSAP then the local or remote port of the transport is used, otherwise the explicit port number is used.

oenum PromisciousModes
Promiscious modes for transport

ovirtual void SetPromiscuous( PromisciousModes promiscuous )
Set read to promiscuous mode. Normally only reads from the specifed remote address are accepted. This flag allows packets to be accepted from any remote, provided the underlying protocol can do so. For example TCP will do nothing.

The Read() call may optionally set the remote address automatically to whatever the sender host of the last received message was.

Default behaviour does nothing.

ovirtual H323TransportAddress GetLastReceivedAddress() const
Get the transport address of the last received PDU.

Default behaviour returns GetRemoteAddress().

ovirtual BOOL ReadPDU( PBYTEArray & pdu ) = 0
Read a protocol data unit from the transport. This will read using the transports mechanism for PDU boundaries, for example UDP is a single Read() call, while for TCP there is a TPKT header that indicates the size of the PDU.
Parameters:
pdu - PDU read from transport

ovirtual BOOL WritePDU( const PBYTEArray & pdu ) = 0
Write a protocol data unit from the transport. This will write using the transports mechanism for PDU boundaries, for example UDP is a single Write() call, while for TCP there is a TPKT header that indicates the size of the PDU.
Parameters:
pdu - PDU to write

o Signalling Channel

oBOOL HandleFirstSignallingChannelPDU()
Wait for first PDU and find/create connection object. If returns FALSE, then the transport is deleted by the calling thread.

o Control Channel

ovirtual H323Transport* CreateControlChannel( H323Connection & connection )
Begin the opening of a control channel. This sets up the channel so that the remote endpoint can connect back to this endpoint. This would be called on the signalling channel instance of a H323Transport.

ovirtual BOOL AcceptControlChannel( H323Connection & connection )
Finish the opening of a control channel. This waits for the connect backfrom the remote endpoint, completing the control channel open sequence.

ovirtual void StartControlChannel( H323Connection & connection )
Connect the control channel

o RAS Channel

ovirtual BOOL DiscoverGatekeeper( H323Gatekeeper & gk, H323RasPDU & pdu, const H323TransportAddress & address )
Discover a Gatekeeper on the network. This locates a gatekeeper on the network and associates this transport object with packet exchange with that gatekeeper.
Parameters:
gk - Gatekeeper to set on discovery.
pdu - GatekeeperRequest PDU
address - Address of gatekeeper (if present)

o Member variable access

oH323EndPoint& GetEndPoint() const
Get the associated endpoint to this transport

ovoid AttachThread( PThread* thread )
Attach a thread to the transport

ovoid CleanUpOnTermination()
Wait for associated thread to terminate

oPThread* thread
Endpoint that owns the listener

o Thread handling the transport
Thread handling the transport


Direct child classes:
H323TransportIP

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.