---
name: "rtpext"
section: "3"
platform: "linux"
package: "libccrtp-doc"
version: "2.0.9-4.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rtpext"
---

# rtpext(3)

ccRTP Extension classes

## NAME

rtpext - ccRTP Extension classes

## SYNOPSIS

### Classes

class **RTPDuplex**\
 A peer associated RTP socket pair for physically connected peer hosts.

### Functions

**RTPDuplex::RTPDuplex** (const InetAddress &bind, tpport\_t local, tpport\_t remote)\
 virtual **RTPDuplex::~RTPDuplex** ()\
 UDPTransmit::Error **RTPDuplex::connect** (const InetHostAddress &host, tpport\_t port=0)\
 bool **RTPDuplex::isPendingData** (**microtimeout\_t** timeout)\
 size\_t **RTPDuplex::sendData** (const unsigned char \*const buffer, size\_t len)\
 size\_t **RTPDuplex::recvData** (unsigned char \*buffer, size\_t len, InetHostAddress &na, tpport\_t &tp)\
 void **RTPDuplex::setDataPeer** (const InetAddress &, tpport\_t)\
 void **RTPDuplex::setControlPeer** (const InetAddress &, tpport\_t)\
 size\_t **RTPDuplex::getNextDataPacketSize** () const\
 **SyncSource** & **RTPDuplex::getPeer** ()\

## Detailed Description

## Function Documentation

### UDPTransmit::Error RTPDuplex::connect (const InetHostAddress & host, tpport\_t port = `0`)

**Parameters**

*host* peer address \
 *port* peer port. If not specified, the same as the local is used

**Returns**

socket status

**Examples** **rtpduphello.cpp**.

### size\_t RTPDuplex::getNextDataPacketSize () const` [inline]`, ` [protected]`, ` [virtual]`

Implements **IncomingDataQueue**.

### SyncSource & RTPDuplex::getPeer ()` [protected]`

**Returns**

the associated peer information

### 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::recvData (unsigned char \* buffer, size\_t len, InetHostAddress & na, tpport\_t & tp)` [inline]`, ` [protected]`, ` [virtual]`

**Parameters**

*buffer* where to store the retrieved data \
 *len* how many octets to read \
 *na* Source network address. \
 *tp* Source transport port.

**Returns**

number of octets read

Implements **IncomingDataQueue**.

### RTPDuplex::RTPDuplex (const InetAddress & bind, tpport\_t local, tpport\_t remote)

**Parameters**

*bind* network address this socket is to be bound \
 *local* transport port this socket is to be bound \
 *remote* peer transpor port

### size\_t RTPDuplex::sendData (const unsigned char \*const buffer, size\_t len)` [inline]`, ` [protected]`, ` [virtual]`

**Parameters**

*buffer* pointer to data to be written \
 *len* how many octets to write

**Returns**

number of octets written

Reimplemented from **OutgoingDataQueue**.

### void RTPDuplex::setControlPeer (const InetAddress &, tpport\_t)` [inline]`, ` [protected]`, ` [virtual]`

**Parameters**

*-* peer host network address. \
 *-* peer host RTCP transport port.

Reimplemented from **OutgoingDataQueue**.

### void RTPDuplex::setDataPeer (const InetAddress &, tpport\_t)` [inline]`, ` [protected]`, ` [virtual]`

**Parameters**

*-* peer host network address. \
 *-* peer host RTP data transport port.

Reimplemented from **OutgoingDataQueue**.

### virtual RTPDuplex::~RTPDuplex ()` [virtual]`

## Author

Generated automatically by Doxygen for ccRTP from the source code.
