Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::netio::TcpServerPort Class Reference

TCP server. More...

#include <tcp_server_port.h>

Inheritance diagram for roc::netio::TcpServerPort:
Collaboration diagram for roc::netio::TcpServerPort:

Public Member Functions

 TcpServerPort (const TcpServerConfig &config, IConnAcceptor &conn_acceptor, uv_loop_t &loop, core::IArena &arena)
 Initialize. More...
 
virtual ~TcpServerPort ()
 Destroy. More...
 
const address::SocketAddrbind_address () const
 Get bind address. More...
 
virtual bool open ()
 Open TCP server. More...
 
virtual AsyncOperationStatus async_close (ICloseHandler &handler, void *handler_arg)
 Asynchronously close TCP server. More...
 
- Public Member Functions inherited from roc::netio::BasicPort
 BasicPort (core::IArena &)
 Initialize. More...
 
virtual ~BasicPort ()
 Destroy. More...
 
const char * descriptor () const
 Get a human-readable port description. More...
 
- Public Member Functions inherited from roc::core::RefCounted< BasicPort, core::ArenaAllocation >
 RefCounted ()
 Initialize. More...
 
 RefCounted (const core::ArenaAllocation &policy)
 Initialize. More...
 
int getref () const
 Get reference counter. More...
 
void incref () const
 Increment reference counter. More...
 
void decref () const
 Decrement reference counter. More...
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data. More...
 

Protected Member Functions

virtual void format_descriptor (core::StringBuilder &b)
 Format descriptor. More...
 
- Protected Member Functions inherited from roc::netio::BasicPort
void update_descriptor ()
 Format descriptor and store into internal buffer. More...
 
- Protected Member Functions inherited from roc::core::ArenaAllocation
IArenaarena () const
 Get arena. More...
 
 ArenaAllocation (IArena &arena)
 Initialize. More...
 
template<class T >
void destroy (T &object)
 Destroy object and return memory to arena. More...
 

Detailed Description

TCP server.

Definition at line 48 of file tcp_server_port.h.

Constructor & Destructor Documentation

◆ TcpServerPort()

roc::netio::TcpServerPort::TcpServerPort ( const TcpServerConfig config,
IConnAcceptor conn_acceptor,
uv_loop_t &  loop,
core::IArena arena 
)

Initialize.

◆ ~TcpServerPort()

virtual roc::netio::TcpServerPort::~TcpServerPort ( )
virtual

Destroy.

Member Function Documentation

◆ async_close()

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

Asynchronously close TCP server.

Remarks
Should be called from network loop thread.

Implements roc::netio::BasicPort.

◆ bind_address()

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

Get bind address.

◆ format_descriptor()

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

Format descriptor.

Implements roc::netio::BasicPort.

◆ open()

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

Open TCP server.

Remarks
Should be called from the network loop thread.

Implements roc::netio::BasicPort.


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