RTPDuplex Class Reference
[ccRTP Extension classesccRTP Extension classes]

A peer associated RTP socket pair for physically connected peer hosts. More...

#include <cc++/rtp.h>

Inheritance diagram for RTPDuplex:

RTPDataQueue IncomingDataQueue OutgoingDataQueue IncomingDataQueueBase MembershipBookkeeping OutgoingDataQueueBase DestinationListHandler RTPQueueBase SyncSourceHandler ParticipantHandler ApplicationHandler ConflictHandler Members RTPQueueBase

List of all members.

Public Member Functions

 RTPDuplex (const InetAddress &bind, tpport_t local, tpport_t remote)
 
Parameters:
bind network address this socket is to be bound

virtual ~RTPDuplex ()
UDPTransmit::Error connect (const InetHostAddress &host, tpport_t port=0)
 
Parameters:
host peer address


Protected Member Functions

bool isPendingData (microtimeout_t timeout)
 
Parameters:
timeout how much time to wait for new data

size_t sendData (const unsigned char *const buffer, size_t len)
 
Parameters:
buffer pointer to data to be written

size_t recvData (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp)
 
Parameters:
buffer where to store the retrieved data

void setDataPeer (const InetAddress &, tpport_t)
 
Parameters:
- peer host network address.

void setControlPeer (const InetAddress &, tpport_t)
 
Parameters:
- peer host network address.

size_t getNextDataPacketSize () const
SyncSourcegetPeer ()
 
Returns:
the associated peer information


Detailed Description

A peer associated RTP socket pair for physically connected peer hosts.

This has no RTCP and assumes the receiver is connected to a known transmitter, hence no "foreign" packets will arrive.

Author:
David Sugar RTP peer host over UDP.
Examples:

rtpduphello.cpp.


Constructor & Destructor Documentation

RTPDuplex::RTPDuplex ( const InetAddress &  bind,
tpport_t  local,
tpport_t  remote 
)

Parameters:
bind network address this socket is to be bound

Parameters:
local transport port this socket is to be bound
remote peer transpor port

virtual RTPDuplex::~RTPDuplex (  )  [virtual]


Member Function Documentation

UDPTransmit::Error RTPDuplex::connect ( const InetHostAddress &  host,
tpport_t  port = 0 
)

Parameters:
host peer address

Parameters:
port peer port. If not specified, the same as the local is used
Returns:
socket status

bool RTPDuplex::isPendingData ( microtimeout_t  timeout  )  [inline, protected, virtual]

Parameters:
timeout how much time to wait for new data

Returns:
if there is some new data

Implements RTPDataQueue.

size_t RTPDuplex::sendData ( const unsigned char *const   buffer,
size_t  len 
) [inline, protected, virtual]

Parameters:
buffer pointer to data to be written

Parameters:
len how many octets to write
Returns:
number of octets written

Reimplemented from OutgoingDataQueue.

size_t RTPDuplex::recvData ( unsigned char *  buffer,
size_t  len,
InetHostAddress &  na,
tpport_t &  tp 
) [inline, protected, virtual]

Parameters:
buffer where to store the retrieved data

Parameters:
len how many octets to read
na Source network address.
tp Source transport port.
Returns:
number of octets read

Implements IncomingDataQueue.

void RTPDuplex::setDataPeer ( const InetAddress &  ,
tpport_t   
) [inline, protected, virtual]

Parameters:
- peer host network address.

Parameters:
- peer host RTP data transport port.

Reimplemented from OutgoingDataQueue.

void RTPDuplex::setControlPeer ( const InetAddress &  ,
tpport_t   
) [inline, protected, virtual]

Parameters:
- peer host network address.

Parameters:
- peer host RTCP transport port.

Reimplemented from OutgoingDataQueue.

size_t RTPDuplex::getNextDataPacketSize (  )  const [inline, protected, virtual]

Implements IncomingDataQueue.

SyncSource& RTPDuplex::getPeer (  )  [protected]

Returns:
the associated peer information


The documentation for this class was generated from the following file:
Generated on Wed Jan 9 22:44:20 2008 for ccRTP by  doxygen 1.5.4