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

UDP sender. More...

#include <udp_sender_port.h>

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

Public Member Functions

 UdpSenderPort (const UdpSenderConfig &config, uv_loop_t &event_loop, core::IAllocator &allocator)
 Initialize.
 
 ~UdpSenderPort ()
 Destroy.
 
const address::SocketAddrbind_address () const
 Get bind address.
 
virtual bool open ()
 Open sender.
 
virtual AsyncOperationStatus async_close (ICloseHandler &handler, void *handler_arg)
 Asynchronously close sender.
 
virtual void write (const packet::PacketPtr &)
 Write packet.
 
- 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.
 
virtual void write (const PacketPtr &)=0
 Write packet.
 

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 sender.

Definition at line 53 of file udp_sender_port.h.

Constructor & Destructor Documentation

◆ UdpSenderPort()

roc::netio::UdpSenderPort::UdpSenderPort ( const UdpSenderConfig config,
uv_loop_t &  event_loop,
core::IAllocator allocator 
)

Initialize.

◆ ~UdpSenderPort()

roc::netio::UdpSenderPort::~UdpSenderPort ( )

Destroy.

Member Function Documentation

◆ async_close()

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

Asynchronously close sender.

Implements roc::netio::BasicPort.

◆ bind_address()

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

Get bind address.

◆ format_descriptor()

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

Format descriptor.

Implements roc::netio::BasicPort.

◆ open()

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

Open sender.

Implements roc::netio::BasicPort.

◆ write()

virtual void roc::netio::UdpSenderPort::write ( const packet::PacketPtr )
virtual

Write packet.

Remarks
May be called from any thread.

Implements roc::packet::IWriter.


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