Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
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

 socket_t (boost::asio::io_context &io_context, std::function< void(tcp::socket &sock, launch_session_t &, msg_t &&)> &&handle_data_fn)
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.
void handle_data (msg_t &&req)

Static Public Member Functions

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_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_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

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

Detailed Description

Definition at line 112 of file rtsp.cpp.

Constructor & Destructor Documentation

◆ socket_t()

rtsp_stream::socket_t::socket_t ( boost::asio::io_context & io_context,
std::function< void(tcp::socket &sock, launch_session_t &, msg_t &&)> && handle_data_fn )
inline

Definition at line 114 of file rtsp.cpp.

Member Function Documentation

◆ handle_data()

void rtsp_stream::socket_t::handle_data ( msg_t && req)
inline

Definition at line 408 of file rtsp.cpp.

◆ handle_plaintext_payload()

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.

Definition at line 296 of file rtsp.cpp.

◆ handle_read_encrypted_header()

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.

Definition at line 156 of file rtsp.cpp.

◆ handle_read_encrypted_message()

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.

Definition at line 205 of file rtsp.cpp.

◆ handle_read_plaintext()

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.

Definition at line 366 of file rtsp.cpp.

◆ read()

void rtsp_stream::socket_t::read ( )
inline

Queue an asynchronous read to begin the next message.

Definition at line 122 of file rtsp.cpp.

◆ read_plaintext_payload()

void rtsp_stream::socket_t::read_plaintext_payload ( )
inline

Queue an asynchronous read of the payload portion of a plaintext message.

Definition at line 267 of file rtsp.cpp.

Member Data Documentation

◆ begin

char* rtsp_stream::socket_t::begin = msg_buf.data()

Definition at line 419 of file rtsp.cpp.

◆ crlf

char* rtsp_stream::socket_t::crlf

Definition at line 418 of file rtsp.cpp.

◆ handle_data_fn

std::function<void(tcp::socket &sock, launch_session_t &, msg_t &&)> rtsp_stream::socket_t::handle_data_fn

Definition at line 412 of file rtsp.cpp.

◆ msg_buf

std::array<char, 2048> rtsp_stream::socket_t::msg_buf

Definition at line 416 of file rtsp.cpp.

◆ session

std::shared_ptr<launch_session_t> rtsp_stream::socket_t::session

Definition at line 421 of file rtsp.cpp.

◆ sock

tcp::socket rtsp_stream::socket_t::sock

Definition at line 414 of file rtsp.cpp.


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