|
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Base class for ports. More...
#include <basic_port.h>
Public Member Functions | |
| 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 | |
| ListNodeData * | list_node_data () const |
| Get list node data. | |
Protected Member Functions | |
| 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 | |
| IAllocator & | allocator () 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. | |
Base class for ports.
Port is a transport-level endpoint, sending or receiving data from remote peer, like UDP sender or receiver, TCP listening socket, or TCP connection.
The following rules must be followed:
Definition at line 39 of file basic_port.h.
|
explicit |
Initialize.
|
virtual |
Destroy.
|
pure virtual |
Asynchronous close.
Implemented in roc::netio::TcpConnectionPort, roc::netio::TcpServerPort, roc::netio::UdpReceiverPort, and roc::netio::UdpSenderPort.
| const char * roc::netio::BasicPort::descriptor | ( | ) | const |
Get a human-readable port description.
|
protectedpure virtual |
Implementation of descriptor formatting.
Implemented in roc::netio::TcpConnectionPort, roc::netio::TcpServerPort, roc::netio::UdpReceiverPort, and roc::netio::UdpSenderPort.
|
pure virtual |
Open port.
Implemented in roc::netio::TcpConnectionPort, roc::netio::TcpServerPort, roc::netio::UdpReceiverPort, and roc::netio::UdpSenderPort.
|
protected |
Format descriptor and store into internal buffer.