Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::netio::UdpReceiverPort Class Reference

UDP receiver. More...

#include <udp_receiver_port.h>

Inheritance diagram for roc::netio::UdpReceiverPort:
roc::netio::BasicPort roc::core::RefCounted< BasicPort, core::StandardAllocation > roc::core::ListNode roc::core::NonCopyable< T > roc::core::StandardAllocation roc::core::NonCopyable< ListNode >

Public Member Functions

 UdpReceiverPort (const UdpReceiverConfig &config, packet::IWriter &writer, uv_loop_t &event_loop, packet::PacketFactory &packet_factory, core::BufferFactory< uint8_t > &buffer_factory, core::IAllocator &allocator)
 Initialize.
 
virtual ~UdpReceiverPort ()
 Destroy.
 
const address::SocketAddrbind_address () const
 Get bind address.
 
virtual bool open ()
 Open receiver.
 
virtual AsyncOperationStatus async_close (ICloseHandler &handler, void *handler_arg)
 Asynchronously close receiver.
 
- Public Member Functions inherited from roc::netio::BasicPort
 BasicPort (core::IAllocator &)
 Initialize.
 
virtual ~BasicPort ()
 Destroy.
 
const char * descriptor () const
 Get a human-readable port description.
 
virtual bool open ()=0
 Open port.
 
virtual AsyncOperationStatus async_close (ICloseHandler &handler, void *handler_arg)=0
 Asynchronous close.
 
- Public Member Functions inherited from roc::core::RefCounted< BasicPort, core::StandardAllocation >
 RefCounted ()
 Initialization with default allocation policy.
 
 RefCounted (const core::StandardAllocation &policy)
 Initialization with arbitrary allocation policy.
 
long getref () const
 Get reference counter.
 
void incref () const
 Increment reference counter.
 
void decref () const
 Decrement reference counter.
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data.
 

Protected Member Functions

virtual void format_descriptor (core::StringBuilder &b)
 Format descriptor.
 
- Protected Member Functions inherited from roc::netio::BasicPort
void update_descriptor ()
 Format descriptor and store into internal buffer.
 
virtual void format_descriptor (core::StringBuilder &b)=0
 Implementation of descriptor formatting.
 
- Protected Member Functions inherited from roc::core::StandardAllocation
IAllocatorallocator () const
 Get allocator.
 
 StandardAllocation ()
 Initialize in invalid state. Such instance wont be usable.
 
 StandardAllocation (IAllocator &allocator)
 Initialize with given allocator. Such instance will use allocator to destroy objects.
 
template<class T >
void destroy (T &object)
 Destroy object and deallocate its memory.
 

Detailed Description

UDP receiver.

Definition at line 47 of file udp_receiver_port.h.

Constructor & Destructor Documentation

◆ UdpReceiverPort()

roc::netio::UdpReceiverPort::UdpReceiverPort ( const UdpReceiverConfig config,
packet::IWriter writer,
uv_loop_t &  event_loop,
packet::PacketFactory packet_factory,
core::BufferFactory< uint8_t > &  buffer_factory,
core::IAllocator allocator 
)

Initialize.

◆ ~UdpReceiverPort()

virtual roc::netio::UdpReceiverPort::~UdpReceiverPort ( )
virtual

Destroy.

Member Function Documentation

◆ async_close()

virtual AsyncOperationStatus roc::netio::UdpReceiverPort::async_close ( ICloseHandler handler,
void *  handler_arg 
)
virtual

Asynchronously close receiver.

Implements roc::netio::BasicPort.

◆ bind_address()

const address::SocketAddr & roc::netio::UdpReceiverPort::bind_address ( ) const

Get bind address.

◆ format_descriptor()

virtual void roc::netio::UdpReceiverPort::format_descriptor ( core::StringBuilder b)
protectedvirtual

Format descriptor.

Implements roc::netio::BasicPort.

◆ open()

virtual bool roc::netio::UdpReceiverPort::open ( )
virtual

Open receiver.

Implements roc::netio::BasicPort.


The documentation for this class was generated from the following file: