Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
stream::control_server_t Class Reference
Collaboration diagram for stream::control_server_t:
[legend]

Public Member Functions

int bind (net::af_e address_family, std::uint16_t port, boost::system::error_code &ec)
session_t * get_session (const net::peer_t peer, uint32_t connect_data)
void iterate (std::chrono::milliseconds timeout)
void call (std::uint16_t type, session_t *session, const std::string_view &payload, bool reinjected)
 Call the handler for a given control stream message.
void map (uint16_t type, std::function< void(session_t *, const std::string_view &)> cb)
int send (const std::string_view &payload, net::peer_t peer)
void flush ()

Public Attributes

std::unordered_map< std::uint16_t, std::function< void(session_t *, const std::string_view &)> > _map_type_cb
sync_util::sync_t< std::vector< session_t * > > _sessions
sync_util::sync_t< std::map< net::peer_t, session_t * > > _peer_to_session
ENetAddress _addr
net::host_t _host

Detailed Description

Definition at line 295 of file stream.cpp.

Member Function Documentation

◆ bind()

int stream::control_server_t::bind ( net::af_e address_family,
std::uint16_t port,
boost::system::error_code & ec )
inline

Definition at line 297 of file stream.cpp.

◆ call()

void stream::control_server_t::call ( std::uint16_t type,
session_t * session,
const std::string_view & payload,
bool reinjected )

Call the handler for a given control stream message.

Parameters
typeThe message type.
sessionThe session the message was received on.
payloadThe payload of the message.
reinjectedtrue if this message is being reprocessed after decryption.

Definition at line 645 of file stream.cpp.

◆ flush()

void stream::control_server_t::flush ( )
inline

Definition at line 339 of file stream.cpp.

◆ get_session()

session_t * stream::control_server_t::get_session ( const net::peer_t peer,
uint32_t connect_data )

Definition at line 578 of file stream.cpp.

◆ iterate()

void stream::control_server_t::iterate ( std::chrono::milliseconds timeout)

Definition at line 664 of file stream.cpp.

◆ map()

void stream::control_server_t::map ( uint16_t type,
std::function< void(session_t *, const std::string_view &)> cb )
inline

Definition at line 324 of file stream.cpp.

◆ send()

int stream::control_server_t::send ( const std::string_view & payload,
net::peer_t peer )
inline

Definition at line 328 of file stream.cpp.

Member Data Documentation

◆ _addr

ENetAddress stream::control_server_t::_addr

Definition at line 352 of file stream.cpp.

◆ _host

net::host_t stream::control_server_t::_host

Definition at line 353 of file stream.cpp.

◆ _map_type_cb

std::unordered_map<std::uint16_t, std::function<void(session_t *, const std::string_view &)> > stream::control_server_t::_map_type_cb

Definition at line 344 of file stream.cpp.

◆ _peer_to_session

sync_util::sync_t<std::map<net::peer_t, session_t *> > stream::control_server_t::_peer_to_session

Definition at line 350 of file stream.cpp.

◆ _sessions

sync_util::sync_t<std::vector<session_t *> > stream::control_server_t::_sessions

Definition at line 347 of file stream.cpp.


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