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

# RTPBaseUDPIPv4Socket(3)

A UDP/IPv4 socket class targeted at RTP stacks.

## NAME

RTPBaseUDPIPv4Socket - A UDP/IPv4 socket class targeted at RTP stacks.

## SYNOPSIS

`#include <channel.h>`

Inherits UDPSocket.

### Public Member Functions

**RTPBaseUDPIPv4Socket** (const InetAddress &ia, tpport\_t port)\
 Constructor for receiver.  **~RTPBaseUDPIPv4Socket** ()\
 bool **isPendingRecv** (**microtimeout\_t** timeout)\
 InetHostAddress **getSender** (tpport\_t &port) const\
 size\_t **recv** (unsigned char \*buffer, size\_t len)\
 size\_t **getNextPacketSize** () const\
 Get size of next datagram waiting to be read.  Socket::Error **setMulticast** (bool enable)\
 Socket::Error **join** (const InetMcastAddress &ia, uint32 iface)\
 Socket::Error **drop** (const InetMcastAddress &ia)\
 Socket::Error **setTimeToLive** (unsigned char ttl)\
 **RTPBaseUDPIPv4Socket** ()\
 Constructor for transmitter.  void **setPeer** (const InetAddress &ia, tpport\_t port)\
 size\_t **send** (const unsigned char \*const buffer, size\_t len)\
 SOCKET **getRecvSocket** () const\
 void **endSocket** ()\

## Detailed Description

A UDP/IPv4 socket class targeted at RTP stacks.

This class provides a flat interface that includes all the services required by an RTP stack.

It can be used in two ways:

To instantiate the DualSocket template, which will be used to instantiate an RTP stack template (such as **TRTPSessionBase**).

To directly instantiate an RTP stack template (such as **TRTPSessionBase**).

This class offers an example of the interface that other classes should provide in order to specialize the ccRTP stack for different underlying protocols.

**Author**

Federico Montesino Pouzols fedemp@altern.org

## Constructor & Destructor Documentation

### RTPBaseUDPIPv4Socket::RTPBaseUDPIPv4Socket (const InetAddress & ia, tpport\_t port)` [inline]`

Constructor for receiver.

### RTPBaseUDPIPv4Socket::~RTPBaseUDPIPv4Socket ()` [inline]`

### RTPBaseUDPIPv4Socket::RTPBaseUDPIPv4Socket ()` [inline]`

Constructor for transmitter.

## Member Function Documentation

### Socket::Error RTPBaseUDPIPv4Socket::drop (const InetMcastAddress & ia)` [inline]`

### void RTPBaseUDPIPv4Socket::endSocket ()` [inline]`

### size\_t RTPBaseUDPIPv4Socket::getNextPacketSize () const` [inline]`

Get size of next datagram waiting to be read.

### SOCKET RTPBaseUDPIPv4Socket::getRecvSocket () const` [inline]`

### InetHostAddress RTPBaseUDPIPv4Socket::getSender (tpport\_t & port) const` [inline]`

### bool RTPBaseUDPIPv4Socket::isPendingRecv (microtimeout\_t timeout)` [inline]`

### Socket::Error RTPBaseUDPIPv4Socket::join (const InetMcastAddress & ia, uint32 iface)` [inline]`

### size\_t RTPBaseUDPIPv4Socket::recv (unsigned char \* buffer, size\_t len)` [inline]`

### size\_t RTPBaseUDPIPv4Socket::send (const unsigned char \*const buffer, size\_t len)` [inline]`

### Socket::Error RTPBaseUDPIPv4Socket::setMulticast (bool enable)` [inline]`

### void RTPBaseUDPIPv4Socket::setPeer (const InetAddress & ia, tpport\_t port)` [inline]`

### Socket::Error RTPBaseUDPIPv4Socket::setTimeToLive (unsigned char ttl)` [inline]`

## Author

Generated automatically by Doxygen for ccRTP from the source code.
