RESTinio
Public Member Functions | Private Attributes | List of all members
restinio::websocket::basic::message_t Class Referencefinal

WebSocket message. More...

#include <message.hpp>

Inheritance diagram for restinio::websocket::basic::message_t:

Public Member Functions

 message_t ()=default
 
 message_t (final_frame_flag_t final_flag, opcode_t opcode)
 
 message_t (final_frame_flag_t final_flag, opcode_t opcode, std::string payload)
 
final_frame_flag_t final_flag () const noexcept
 Get final flag. More...
 
void set_final_flag (final_frame_flag_t final_flag) noexcept
 
bool is_final () const noexcept
 
opcode_t opcode () const noexcept
 
void set_opcode (opcode_t opcode) noexcept
 
const std::string & payload () const noexcept
 
std::string & payload () noexcept
 
void set_payload (std::string str)
 

Private Attributes

final_frame_flag_t m_final_flag { final_frame }
 Final flag. More...
 
opcode_t m_opcode = opcode_t::continuation_frame
 Opcode. More...
 
std::string m_payload
 Websocket message payload. More...
 

Detailed Description

WebSocket message.

Definition at line 143 of file message.hpp.

Constructor & Destructor Documentation

◆ message_t() [1/3]

restinio::websocket::basic::message_t::message_t ( )
default

◆ message_t() [2/3]

restinio::websocket::basic::message_t::message_t ( final_frame_flag_t  final_flag,
opcode_t  opcode 
)
inline

Definition at line 150 of file message.hpp.

◆ message_t() [3/3]

restinio::websocket::basic::message_t::message_t ( final_frame_flag_t  final_flag,
opcode_t  opcode,
std::string  payload 
)
inline

Definition at line 157 of file message.hpp.

Member Function Documentation

◆ final_flag()

final_frame_flag_t restinio::websocket::basic::message_t::final_flag ( ) const
inlinenoexcept

Get final flag.

Definition at line 168 of file message.hpp.

◆ is_final()

bool restinio::websocket::basic::message_t::is_final ( ) const
inlinenoexcept

Definition at line 180 of file message.hpp.

◆ opcode()

opcode_t restinio::websocket::basic::message_t::opcode ( ) const
inlinenoexcept

Definition at line 186 of file message.hpp.

◆ payload() [1/2]

const std::string& restinio::websocket::basic::message_t::payload ( ) const
inlinenoexcept

Definition at line 198 of file message.hpp.

◆ payload() [2/2]

std::string& restinio::websocket::basic::message_t::payload ( )
inlinenoexcept

Definition at line 204 of file message.hpp.

◆ set_final_flag()

void restinio::websocket::basic::message_t::set_final_flag ( final_frame_flag_t  final_flag)
inlinenoexcept

Definition at line 174 of file message.hpp.

◆ set_opcode()

void restinio::websocket::basic::message_t::set_opcode ( opcode_t  opcode)
inlinenoexcept

Definition at line 192 of file message.hpp.

◆ set_payload()

void restinio::websocket::basic::message_t::set_payload ( std::string  str)
inline

Definition at line 210 of file message.hpp.

Member Data Documentation

◆ m_final_flag

final_frame_flag_t restinio::websocket::basic::message_t::m_final_flag { final_frame }
private

Final flag.

Definition at line 217 of file message.hpp.

◆ m_opcode

opcode_t restinio::websocket::basic::message_t::m_opcode = opcode_t::continuation_frame
private

Opcode.

Definition at line 220 of file message.hpp.

◆ m_payload

std::string restinio::websocket::basic::message_t::m_payload
private

Websocket message payload.

Definition at line 223 of file message.hpp.


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