Sunshine latest
Self-hosted game stream host for Moonlight.
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)
 
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 flush ()
 
session_tget_session (const net::peer_t peer, uint32_t connect_data)
 
void iterate (std::chrono::milliseconds timeout)
 
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)
 

Public Attributes

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

Member Function Documentation

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

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