Sunshine latest
Self-hosted game stream host for Moonlight.
rtsp_stream::socket_t Class Reference
Inheritance diagram for rtsp_stream::socket_t:
[legend]
Collaboration diagram for rtsp_stream::socket_t:
[legend]

Public Member Functions

void handle_data (msg_t &&req)
 
void read ()
 Queue an asynchronous read to begin the next message.
 
void read_plaintext_payload ()
 Queue an asynchronous read of the payload portion of a plaintext message.
 
 socket_t (boost::asio::io_context &io_context, std::function< void(tcp::socket &sock, launch_session_t &, msg_t &&)> &&handle_data_fn)
 

Static Public Member Functions

static void handle_plaintext_payload (std::shared_ptr< socket_t > &socket, const boost::system::error_code &ec, std::size_t bytes)
 Handle the read of the payload portion of a plaintext message.
 
static void handle_read_encrypted_header (std::shared_ptr< socket_t > &socket, const boost::system::error_code &ec, std::size_t bytes)
 Handle the initial read of the header of an encrypted message.
 
static void handle_read_encrypted_message (std::shared_ptr< socket_t > &socket, const boost::system::error_code &ec, std::size_t bytes)
 Handle the final read of the content of an encrypted message.
 
static void handle_read_plaintext (std::shared_ptr< socket_t > &socket, const boost::system::error_code &ec, std::size_t bytes)
 Handle the read of the header portion of a plaintext message.
 

Public Attributes

char * begin = msg_buf.data()
 
char * crlf
 
std::function< void(tcp::socket &sock, launch_session_t &, msg_t &&) handle_data_fn )
 
std::array< char, 2048 > msg_buf
 
std::shared_ptr< launch_session_tsession
 
tcp::socket sock
 

Member Function Documentation

◆ handle_plaintext_payload()

static void rtsp_stream::socket_t::handle_plaintext_payload ( std::shared_ptr< socket_t > & socket,
const boost::system::error_code & ec,
std::size_t bytes )
inlinestatic

Handle the read of the payload portion of a plaintext message.

Parameters
socketThe socket the message was received on.
ecThe error code of the read operation.
bytesThe number of bytes read.

◆ handle_read_encrypted_header()

static void rtsp_stream::socket_t::handle_read_encrypted_header ( std::shared_ptr< socket_t > & socket,
const boost::system::error_code & ec,
std::size_t bytes )
inlinestatic

Handle the initial read of the header of an encrypted message.

Parameters
socketThe socket the message was received on.
ecThe error code of the read operation.
bytesThe number of bytes read.

◆ handle_read_encrypted_message()

static void rtsp_stream::socket_t::handle_read_encrypted_message ( std::shared_ptr< socket_t > & socket,
const boost::system::error_code & ec,
std::size_t bytes )
inlinestatic

Handle the final read of the content of an encrypted message.

Parameters
socketThe socket the message was received on.
ecThe error code of the read operation.
bytesThe number of bytes read.

◆ handle_read_plaintext()

static void rtsp_stream::socket_t::handle_read_plaintext ( std::shared_ptr< socket_t > & socket,
const boost::system::error_code & ec,
std::size_t bytes )
inlinestatic

Handle the read of the header portion of a plaintext message.

Parameters
socketThe socket the message was received on.
ecThe error code of the read operation.
bytesThe number of bytes read.

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