#include <transports.h>
Inheritance diagram for OpalTransport:
Operations | |
typedef BOOL(* | WriteConnectCallback )(OpalTransport &transport, void *userData) |
enum | PromisciousModes { AcceptFromRemoteOnly, AcceptFromAnyAutoSet, AcceptFromAny, NumPromisciousModes } |
virtual BOOL | IsReliable () const =0 |
virtual OpalTransportAddress | GetLocalAddress () const =0 |
virtual BOOL | SetLocalAddress (const OpalTransportAddress &address)=0 |
virtual OpalTransportAddress | GetRemoteAddress () const =0 |
virtual BOOL | SetRemoteAddress (const OpalTransportAddress &address)=0 |
virtual BOOL | Connect ()=0 |
BOOL | ConnectTo (const OpalTransportAddress &address) |
virtual void | EndConnect (const OpalTransportAddress &localAddress) |
virtual BOOL | Close () |
void | CloseWait () |
void | CleanUpOnTermination () |
virtual BOOL | IsCompatibleTransport (const OpalTransportAddress &address) const =0 |
Promiscious modes for transport. | |
virtual void | SetPromiscuous (PromisciousModes promiscuous) |
virtual OpalTransportAddress | GetLastReceivedAddress () const |
virtual BOOL | ReadPDU (PBYTEArray &packet)=0 |
virtual BOOL | WritePDU (const PBYTEArray &pdu)=0 |
virtual BOOL | WriteConnect (WriteConnectCallback function, void *userData) |
virtual void | AttachThread (PThread *thread) |
virtual BOOL | IsRunning () const |
Public Member Functions | |
OpalEndPoint & | GetEndPoint () const |
Construction | |
OpalTransport (OpalEndPoint &endpoint) | |
~OpalTransport () | |
Overrides from PObject | |
void | PrintOn (ostream &strm) const |
Protected Attributes | |
OpalEndPoint & | endpoint |
PThread * | thread |
Thread handling the transport. |
|
|
|
|
|
Create a new transport channel. |
|
Destroy the transport channel. |
|
Attach a thread to the transport. |
|
Close channel and wait for associated thread to terminate. For backward compatibility with OpenH323, now deprecated. |
|
Close the channel. Reimplemented in OpalTransportUDP. |
|
Close channel and wait for associated thread to terminate. |
|
Connect to the remote address. Implemented in OpalTransportTCP, and OpalTransportUDP. |
|
Connect to the specified address. |
|
End a connection to the remote address. This is requried in some circumstances where the connection to the remote is not atomic. The default behaviour does nothing.
Reimplemented in OpalTransportUDP. |
|
|
|
Get the transport address of the last received PDU. Default behaviour returns GetRemoteAddress(). Reimplemented in OpalTransportUDP. |
|
Get the transport dependent name of the local endpoint. Implemented in OpalTransportIP. |
|
Get the transport address of the remote endpoint. Implemented in OpalTransportIP. |
|
Promiscious modes for transport. Check that the transport address is compatible with transport. Implemented in OpalTransportTCP, and OpalTransportUDP. |
|
Get indication of the type of underlying transport. Implemented in OpalTransportTCP, and OpalTransportUDP. |
|
Determine of the transport is running with a background thread. |
|
Print the description of the listener to the stream. |
|
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.
Implemented in OpalTransportTCP, and OpalTransportUDP. |
|
Set local address to connect from. Note that this may not work for all transport types or may work only before Connect() has been called. Implemented in OpalTransportIP, and OpalTransportUDP. |
|
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. Reimplemented in OpalTransportUDP. |
|
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. Implemented in OpalTransportIP, and OpalTransportUDP. |
|
Write the first packet to the transport, after a connect. This will adjust the transport object and call the callback function, possibly multiple times for some transport types. It is expected that this is used just after a Connect() call where some transports (eg UDP) cannot determine its local address which is required in the PDU to be sent. This must be done fer each interface so WriteConnect() calls WriteConnectCallback for each interface. The subsequent ReadPDU() returns the answer from the first interface. The default behaviour simply calls the WriteConnectCallback function.
Reimplemented in OpalTransportUDP. |
|
Write a packet to 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.
Implemented in OpalTransportTCP, and OpalTransportUDP. |
|
|
|
Thread handling the transport.
|