UDPSession Class Reference

RTP or UDPTL session. More...

#include <yatertp.h>

Inheritance diagram for UDPSession:
RTPProcessor GenObject RTPSession UDPTLSession

List of all members.

Public Member Functions

virtual ~UDPSession ()
virtual RTPTransportcreateTransport ()
bool initTransport ()
bool initGroup (int msec=0, Thread::Priority prio=Thread::Normal)
bool remoteAddr (SocketAddr &addr, bool sniff=false)
bool setTOS (int tos)
SocketrtpSock ()
bool drillHole ()
void setTimeout (int interval)
RTPTransporttransport () const
virtual void transport (RTPTransport *trans)

Protected Member Functions

 UDPSession ()
virtual void timeout (bool initial)

Protected Attributes

RTPTransportm_transport
u_int64_t m_timeoutTime
u_int64_t m_timeoutInterval

Detailed Description

RTP or UDPTL session.

A base class for RTP, SRTP or UDPTL sessions


Constructor & Destructor Documentation

virtual ~UDPSession (  )  [virtual]

Destructor - cleans up any remaining resources

UDPSession (  )  [protected]

Default constructor


Member Function Documentation

virtual RTPTransport* createTransport (  )  [virtual]

Create a new RTP or UDP transport for this session. Override this method to create objects derived from RTPTransport.

Returns:
Pointer to the new transport or NULL on failure

Reimplemented in UDPTLSession.

bool drillHole (  )  [inline]

Drill a hole in a firewall or NAT for the RTP and RTCP sockets

Returns:
True if at least a packet was sent for the RTP socket
bool initGroup ( int  msec = 0,
Thread::Priority  prio = Thread::Normal 
)

Initialize the RTP session, attach a group if none is present

Parameters:
msec Minimum time to sleep in group loop in milliseconds
prio Thread priority to run the new group
Returns:
True if initialized, false on some failure
bool initTransport (  ) 

Initialize the RTP session, attach a transport if there is none

Returns:
True if initialized, false on some failure
bool remoteAddr ( SocketAddr addr,
bool  sniff = false 
) [inline]

Set the remote network address of the RTP transport of this session

Parameters:
addr New remote RTP transport address
sniff Automatically adjust the address from the first incoming packet
Returns:
True if address set, false if a failure occured
Socket* rtpSock (  )  [inline]

Get the main transport socket used by this session

Returns:
Pointer to the RTP or UDPTL socket, NULL if no transport exists
void setTimeout ( int  interval  ) 

Set the interval until receiver timeout is detected

Parameters:
interval Milliseconds until receiver times out, zero to disable
bool setTOS ( int  tos  )  [inline]

Set the Type Of Service for the RTP transport socket

Parameters:
tos Type Of Service bits to set
Returns:
True if operation was successfull, false if an error occured
virtual void timeout ( bool  initial  )  [protected, virtual]

Method called when the receiver timed out

Parameters:
initial True if no packet was ever received in this session
virtual void transport ( RTPTransport trans  )  [virtual]

Set the UDP transport of data handled by this session

Parameters:
trans A pointer to the new RTPTransport for this session

Reimplemented in RTPSession.

RTPTransport* transport (  )  const [inline]

Get the RTP/RTCP transport of data handled by this session.

Returns:
A pointer to the RTPTransport of this session

The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:19:44 2010 for Yate by  doxygen 1.6.3