#include <transports.h>
OpalTransportTCP::OpalTransportTCP |
( |
OpalEndPoint & |
endpoint, |
|
|
PIPSocket::Address |
binding = PIPSocket::GetDefaultIpAny() , |
|
|
WORD |
port = 0 , |
|
|
bool |
dummy = false |
|
) |
| |
Create a new transport channel.
- Parameters
-
endpoint | Endpoint object |
binding | Local interface to use |
port | Local port to bind to |
dummy | Place holder for template reuseAddr param |
OpalTransportTCP::OpalTransportTCP |
( |
OpalEndPoint & |
endpoint, |
|
|
PChannel * |
socket |
|
) |
| |
- Parameters
-
endpoint | Endpoint object |
socket | Socket to use |
OpalTransportTCP::~OpalTransportTCP |
( |
| ) |
|
virtual PBoolean OpalTransportTCP::Connect |
( |
| ) |
|
|
virtual |
virtual const PCaselessString& OpalTransportTCP::GetProtoPrefix |
( |
| ) |
const |
|
protectedvirtual |
Get the prefix for this transports protocol type.
Implements OpalTransportIP.
virtual PBoolean OpalTransportTCP::IsCompatibleTransport |
( |
const OpalTransportAddress & |
address | ) |
const |
|
virtual |
Check that the transport address is compatible with transport.
Implements OpalTransport.
virtual PBoolean OpalTransportTCP::IsReliable |
( |
| ) |
const |
|
virtual |
Get indication of the type of underlying transport.
Implements OpalTransport.
bool OpalTransportTCP::OnConnectedSocket |
( |
PTCPSocket * |
socket | ) |
|
|
protected |
virtual PBoolean 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.
If false is returned but there is data returned in the packet
that indicates that the available buffer space was too small, e.g. an EMSGSIZE error was returned by recvfrom.
- Parameters
-
pdu | PDU read from transport |
Implements OpalTransport.
void OpalTransportTCP::SetPDULengthFormat |
( |
int |
fmt, |
|
|
int |
off |
|
) |
| |
|
inline |
Set PDU length format. Zero indicates TPKT format (default) Negative number is number of little endian bytes. Positive number is number of big endian bytes.
off is added to the length after the above is read.
Examples: 16 bit big endian length header which include the length itself, would be: 2, -2 -> 00 05 AA BB CC 32 bit little endian length header would be: -4, 0 -> 03 00 00 00 AA BB CC
References m_pduLengthFormat, and m_pduLengthOffset.
virtual PBoolean 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
-
Implements OpalTransport.
int OpalTransportTCP::m_pduLengthFormat |
|
protected |
int OpalTransportTCP::m_pduLengthOffset |
|
protected |
The documentation for this class was generated from the following file: