Yate
|
RTP or UDPTL session. More...
#include <yatertp.h>
Public Member Functions | |
virtual | ~UDPSession () |
virtual RTPTransport * | createTransport () |
bool | initTransport () |
bool | initGroup (int msec=0, Thread::Priority prio=Thread::Normal) |
bool | remoteAddr (SocketAddr &addr, bool sniff=false) |
bool | setTOS (int tos) |
Socket * | rtpSock () |
bool | drillHole () |
void | setTimeout (int interval) |
RTPTransport * | transport () const |
virtual void | transport (RTPTransport *trans) |
Protected Member Functions | |
UDPSession () | |
virtual void | timeout (bool initial) |
Protected Attributes | |
RTPTransport * | m_transport |
u_int64_t | m_timeoutTime |
u_int64_t | m_timeoutInterval |
RTP or UDPTL session.
A base class for RTP, SRTP or UDPTL sessions
virtual ~UDPSession | ( | ) | [virtual] |
Destructor - cleans up any remaining resources
UDPSession | ( | ) | [protected] |
Default constructor
virtual RTPTransport* createTransport | ( | ) | [virtual] |
Create a new RTP or UDP transport for this session. Override this method to create objects derived from RTPTransport.
Reimplemented in UDPTLSession.
bool drillHole | ( | ) | [inline] |
Drill a hole in a firewall or NAT for the RTP and RTCP sockets
bool initGroup | ( | int | msec = 0 , |
Thread::Priority | prio = Thread::Normal |
||
) |
Initialize the RTP session, attach a group if none is present
msec | Minimum time to sleep in group loop in milliseconds |
prio | Thread priority to run the new group |
bool initTransport | ( | ) |
Initialize the RTP session, attach a transport if there is none
bool remoteAddr | ( | SocketAddr & | addr, |
bool | sniff = false |
||
) | [inline] |
Set the remote network address of the RTP transport of this session
addr | New remote RTP transport address |
sniff | Automatically adjust the address from the first incoming packet |
Get the main transport socket used by this session
void setTimeout | ( | int | interval | ) |
Set the interval until receiver timeout is detected
interval | Milliseconds until receiver times out, zero to disable |
bool setTOS | ( | int | tos | ) | [inline] |
Set the Type Of Service for the RTP transport socket
tos | Type Of Service bits to set |
virtual void timeout | ( | bool | initial | ) | [protected, virtual] |
Method called when the receiver timed out
initial | True if no packet was ever received in this session |
RTPTransport* transport | ( | ) | const [inline] |
Get the RTP/RTCP transport of data handled by this session.
virtual void transport | ( | RTPTransport * | trans | ) | [virtual] |
Set the UDP transport of data handled by this session
trans | A pointer to the new RTPTransport for this session |
Reimplemented in RTPSession.