OPAL  Version 3.10.10
OpalTransportIP Class Referenceabstract

#include <transports.h>

Inheritance diagram for OpalTransportIP:
OpalTransport OpalTransportTCP OpalTransportUDP

Public Member Functions

Construction
 OpalTransportIP (OpalEndPoint &endpoint, PIPSocket::Address binding, WORD port)
 
Operations
virtual OpalTransportAddress GetLocalAddress (bool allowNAT=true) const
 
virtual PBoolean SetLocalAddress (const OpalTransportAddress &address)
 
virtual OpalTransportAddress GetRemoteAddress () const
 
virtual PBoolean SetRemoteAddress (const OpalTransportAddress &address)
 
- Public Member Functions inherited from OpalTransport
OpalEndPointGetEndPoint () const
 
PMutex & GetWriteMutex ()
 
 OpalTransport (OpalEndPoint &endpoint)
 
 ~OpalTransport ()
 
void PrintOn (ostream &strm) const
 
virtual PBoolean IsReliable () const =0
 
virtual PString GetInterface () const
 
virtual bool SetInterface (const PString &iface)
 
virtual PBoolean Connect ()=0
 
PBoolean ConnectTo (const OpalTransportAddress &address)
 
virtual PBoolean Close ()
 
void CloseWait ()
 
void CleanUpOnTermination ()
 
virtual PBoolean IsCompatibleTransport (const OpalTransportAddress &address) const =0
 Promiscious modes for transport. More...
 
virtual void SetPromiscuous (PromisciousModes promiscuous)
 
virtual OpalTransportAddress GetLastReceivedAddress () const
 
virtual PString GetLastReceivedInterface () const
 
virtual PBoolean ReadPDU (PBYTEArray &packet)=0
 
virtual PBoolean WritePDU (const PBYTEArray &pdu)=0
 
virtual PBoolean WriteConnect (WriteConnectCallback function, void *userData)
 
virtual void AttachThread (PThread *thread)
 
virtual PBoolean IsRunning () const
 

Protected Member Functions

virtual const char * GetProtoPrefix () const =0
 

Protected Attributes

PIPSocket::Address localAddress
 
WORD localPort
 
PIPSocket::Address remoteAddress
 
WORD remotePort
 
- Protected Attributes inherited from OpalTransport
OpalEndPointendpoint
 
PThread * thread
 Thread handling the transport. More...
 
PMutex m_writeMutex
 

Additional Inherited Members

- Public Types inherited from OpalTransport
enum  PromisciousModes { AcceptFromRemoteOnly, AcceptFromAnyAutoSet, AcceptFromAny, NumPromisciousModes }
 
typedef PBoolean(* WriteConnectCallback) (OpalTransport &transport, void *userData)
 

Constructor & Destructor Documentation

OpalTransportIP::OpalTransportIP ( OpalEndPoint endpoint,
PIPSocket::Address  binding,
WORD  port 
)

Create a new transport channel.

Parameters
endpointEndpoint object
bindingLocal interface to use
portLocal port to bind to

Member Function Documentation

virtual OpalTransportAddress OpalTransportIP::GetLocalAddress ( bool  allowNAT = true) const
virtual

Get the transport dependent name of the local endpoint.

Parameters
allowNATAllow translation if remote needs NAT

Implements OpalTransport.

Reimplemented in OpalTransportUDP.

virtual const char* OpalTransportIP::GetProtoPrefix ( ) const
protectedpure virtual

Get the prefix for this transports protocol type.

Implements OpalTransport.

Implemented in OpalTransportUDP, and OpalTransportTCP.

virtual OpalTransportAddress OpalTransportIP::GetRemoteAddress ( ) const
virtual

Get the transport dependent name of the remote endpoint.

Implements OpalTransport.

virtual PBoolean OpalTransportIP::SetLocalAddress ( const OpalTransportAddress address)
virtual

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.

Implements OpalTransport.

Reimplemented in OpalTransportUDP.

virtual PBoolean OpalTransportIP::SetRemoteAddress ( const OpalTransportAddress address)
virtual

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.

Implements OpalTransport.

Reimplemented in OpalTransportUDP.

Field Documentation

PIPSocket::Address OpalTransportIP::localAddress
protected
WORD OpalTransportIP::localPort
protected
PIPSocket::Address OpalTransportIP::remoteAddress
protected
WORD OpalTransportIP::remotePort
protected

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