![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Base class for ports. More...
#include <roc_netio/target_libuv/roc_netio/basic_port.h>

Public Member Functions | |
| BasicPort (core::IArena &) | |
| 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::ArenaAllocation > | |
| RefCounted () | |
| Initialize. | |
| RefCounted (const core::ArenaAllocation &policy) | |
| Initialize. | |
| int | 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< Tag > | |
| ListData * | list_data () const |
| Get pointer to internal 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::ArenaAllocation | |
| IArena & | arena () const |
| Get arena. | |
| ArenaAllocation (IArena &arena) | |
| Initialize. | |
| template<class T > | |
| void | destroy (T &object) |
| Destroy object and return memory to arena. | |
Additional Inherited Members | |
Static Public Member Functions inherited from roc::core::ListNode< Tag > | |
| static ListNode * | list_node (ListData *data) |
| Get pointer to parent node from pointer to internal data. | |
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, and roc::netio::UdpPort.
| 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, and roc::netio::UdpPort.
|
pure virtual |
Open port.
Implemented in roc::netio::TcpConnectionPort, roc::netio::TcpServerPort, and roc::netio::UdpPort.
|
protected |
Format descriptor and store into internal buffer.