OpalTransportTCP Class Reference

#include <transports.h>

Inheritance diagram for OpalTransportTCP:

OpalTransportIP OpalTransport List of all members.

Public Member Functions

Overides from class OpalTransport
virtual BOOL IsReliable () const
virtual BOOL IsCompatibleTransport (const OpalTransportAddress &address) const
virtual BOOL Connect ()
virtual BOOL ReadPDU (PBYTEArray &pdu)
virtual BOOL WritePDU (const PBYTEArray &pdu)

Protected Member Functions

virtual const char * GetProtoPrefix () const
virtual BOOL OnOpen ()

Protected Attributes

BOOL reuseAddressFlag

Constructor & Destructor Documentation

OpalTransportTCP::OpalTransportTCP ( OpalEndPoint endpoint,
PIPSocket::Address  binding = PIPSocket::GetDefaultIpAny(),
WORD  port = 0,
BOOL  reuseAddr = FALSE 
)

Create a new transport channel.

Parameters:
endpoint  Endpoint object
binding  Local interface to use
port  Local port to bind to
reuseAddr  Flag for binding to already bound interface

OpalTransportTCP::OpalTransportTCP ( OpalEndPoint endpoint,
PTCPSocket *  socket 
)

Parameters:
endpoint  Endpoint object
socket  Socket to use

OpalTransportTCP::~OpalTransportTCP (  ) 

Destroy the TCP channel.

OpalTransportTCP::OpalTransportTCP ( OpalEndPoint endpoint,
PIPSocket::Address  binding = PIPSocket::GetDefaultIpAny(),
WORD  port = 0,
BOOL  reuseAddr = FALSE 
)

Create a new transport channel.

Parameters:
endpoint  Endpoint object
binding  Local interface to use
port  Local port to bind to
reuseAddr  Flag for binding to already bound interface

OpalTransportTCP::OpalTransportTCP ( OpalEndPoint endpoint,
PTCPSocket *  socket 
)

Parameters:
endpoint  Endpoint object
socket  Socket to use

OpalTransportTCP::~OpalTransportTCP (  ) 

Destroy the TCP channel.


Member Function Documentation

virtual BOOL OpalTransportTCP::IsReliable (  )  const [virtual]

Get indication of the type of underlying transport.

Implements OpalTransport.

virtual BOOL OpalTransportTCP::IsCompatibleTransport ( const OpalTransportAddress address  )  const [virtual]

Check that the transport address is compatible with transport.

Implements OpalTransport.

virtual BOOL OpalTransportTCP::Connect (  )  [virtual]

Connect to the remote address.

Implements OpalTransport.

virtual BOOL OpalTransportTCP::ReadPDU ( PBYTEArray &  pdu  )  [virtual]

Read a packet 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

Implements OpalTransport.

virtual BOOL OpalTransportTCP::WritePDU ( const PBYTEArray &  pdu  )  [virtual]

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.

Parameters:
pdu  Packet to write

Implements OpalTransport.

virtual const char* OpalTransportTCP::GetProtoPrefix (  )  const [protected, virtual]

Get the prefix for this transports protocol type.

Implements OpalTransportIP.

virtual BOOL OpalTransportTCP::OnOpen (  )  [protected, virtual]

This callback is executed when the Open() function is called with open channels. It may be used by descendent channels to do any handshaking required by the protocol that channel embodies.

The default behaviour is to simply return TRUE.

Returns:
Returns TRUE if the protocol handshaking is successful.


Member Data Documentation

BOOL OpalTransportTCP::reuseAddressFlag [protected]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:34:05 2008 for OPAL by  doxygen 1.5.1