# class RTPTransport | Low level transport for RTP and RTCP. More...
Full name | `TelEngine::RTPTransport`
Definition | `#include <libs/yrtp/yatertp.h>`
Inherits | TelEngine::RTPProcessor [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Activation { Inactive, Bound, Active }
- enum Type { Unknown, RTP, UDPTL }

#### Public Methods

- RTPTransport (Type type = RTP)
- virtual ~RTPTransport ()
- virtual void destruct ()
- void setProcessor (RTPProcessor* processor = 0)
- void setMonitor (RTPProcessor* monitor = 0)
- inline const SocketAddr& localAddr () const
- inline const SocketAddr& remoteAddr () const
- bool localAddr (SocketAddr& addr, bool rtcp = true)
- bool remoteAddr (SocketAddr& addr, bool sniff = false)
- bool setBuffer (int bufLen = 4096)
- inline bool setTOS (int tos)
- inline Socket* rtpSock ()
- inline Socket* rtcpSock ()
- bool drillHole ()

#### Protected Methods

- virtual void timerTick (const Time& when)
- virtual void rtpData (const void* data, int len)
- virtual void rtcpData (const void* data, int len)

## Detailed Description

Class that holds sockets and addresses for transporting RTP and RTCP packets.

enum Activation { Inactive, Bound, Active } | ### Activation

Activation status of the transport

enum Type { Unknown, RTP, UDPTL } | ### Type

Type of transported data

RTPTransport (Type type = RTP) | ### RTPTransport

Constructor, creates an unconnected transport

Parameters:

type | Type of check to apply to the data

~RTPTransport () | ### ~RTPTransport

[virtual]

Destructor

void destruct () | ### destruct

[virtual]

Destroys the object, disposes the memory. Do not call delete directly.

Reimplemented from GenObject.

void setProcessor (RTPProcessor* processor = 0) | ### setProcessor

Set the RTP/RTCP processor of data received by this transport

Parameters:

processor | A pointer to the RTPProcessor for this transport

void setMonitor (RTPProcessor* monitor = 0) | ### setMonitor

Set the RTP/RTCP monitor of data received by this transport

Parameters:

monitor | A pointer to a second RTPProcessor for this transport

inline const SocketAddr& localAddr () | ### localAddr

[const]

Get the local network address of the RTP transport

Returns: Reference to the local RTP transport address

inline const SocketAddr& remoteAddr () | ### remoteAddr

[const]

Get the remote network address of the RTP transport

Returns: Reference to the remote RTP transport address

bool localAddr (SocketAddr& addr, bool rtcp = true) | ### localAddr

Set the local network address of the RTP transport

Parameters:

addr | New local RTP transport address
rtcp | Enable RTCP transport

Returns: True if address set, false if a failure occured

bool remoteAddr (SocketAddr& addr, bool sniff = false) | ### remoteAddr

Set the remote network address of the RTP transport

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

bool setBuffer (int bufLen = 4096) | ### setBuffer

Set the size of the operating system's buffers for the RTP and RTCP sockets

Parameters:

bufLen | Requested length of the buffer

Returns: True if the buffer length was set

inline bool setTOS (int tos) | ### setTOS

Set the Type Of Service for the RTP socket

Parameters:

tos | Type Of Service bits to set

Returns: True if operation was successfull, false if an error occured

inline Socket* rtpSock () | ### rtpSock

Get the RTP socket used by this transport

Returns: Pointer to the RTP socket

inline Socket* rtcpSock () | ### rtcpSock

Get the RTCP socket used by this transport

Returns: Pointer to the RTCP socket

bool drillHole () | ### drillHole

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

void timerTick (const Time& when) | ### timerTick

[protected virtual]

Method called periodically to read data out of sockets

Parameters:

when | Time to use as base in all computing

Reimplemented from RTPProcessor.

void rtpData (const void* data, int len) | ### rtpData

[protected virtual]

This method is called to send a RTP packet

Parameters:

data | Pointer to raw RTP data
len | Length of the data packet

Reimplemented from RTPProcessor.

void rtcpData (const void* data, int len) | ### rtcpData

[protected virtual]

This method is called to send a RTCP packet

Parameters:

data | Pointer to raw RTCP data
len | Length of the data packet

Reimplemented from RTPProcessor.

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.