restinio::websocket::basic::impl::message_details_t Class Reference

Websocket message class with more detailed protocol information. More...

`#include <ws_parser.hpp>`

## Public Member Functions

| message_details_t ()=default
| message_details_t (final_frame_flag_t final_flag, opcode_t opcode, size_t payload_len) noexcept
| message_details_t (final_frame_flag_t final_flag, opcode_t opcode, size_t payload_len, std::uint32_t masking_key)
std::uint64_t | payload_len () const
| Get payload len. More...
void | set_masking_key (std::uint32_t value)
| Set masking key. More...

## Public Attributes

bool | m_final_flag = true
| Final flag. More...
opcode_t | m_opcode = opcode_t::continuation_frame
| Opcode. More...
bool | m_mask_flag = false
| Mask flag. More...
std::uint8_t | m_payload_len = 0
| Payload len. More...
std::uint64_t | m_ext_payload_len = 0
| Ext payload len. More...
std::uint32_t | m_masking_key = 0
| Masking key. More...
bool | m_rsv1_flag = false
| Reserved flags. More...
bool | m_rsv2_flag = false
bool | m_rsv3_flag = false

## Private Member Functions

void | init_payload_len (size_t payload_len)
| Initialize payload len. More...

## Detailed Description

Websocket message class with more detailed protocol information.

Definition at line 62 of file ws_parser.hpp.

## Constructor & Destructor Documentation

## message_details_t() [1/3]

restinio::websocket::basic::impl::message_details_t::message_details_t | ( |  | ) |

default

## message_details_t() [2/3]

restinio::websocket::basic::impl::message_details_t::message_details_t | ( | final_frame_flag_t | final_flag,
|  | opcode_t | opcode,
|  | size_t | payload_len
| ) |  |

inlinenoexcept

Definition at line 67 of file ws_parser.hpp.

## message_details_t() [3/3]

restinio::websocket::basic::impl::message_details_t::message_details_t | ( | final_frame_flag_t | final_flag,
|  | opcode_t | opcode,
|  | size_t | payload_len,
|  | std::uint32_t | masking_key
| ) |  |

inline

Definition at line 77 of file ws_parser.hpp.

## Member Function Documentation

## init_payload_len()

void restinio::websocket::basic::impl::message_details_t::init_payload_len | ( | size_t | payload_len | ) |

inlineprivate

Initialize payload len.

Set only payload length if value is lower than 126 or payload length and ext payload length otherwise.

Definition at line 142 of file ws_parser.hpp.

## payload_len()

std::uint64_t restinio::websocket::basic::impl::message_details_t::payload_len | ( |  | ) | const

inline

Get payload len.

Definition at line 92 of file ws_parser.hpp.

## set_masking_key()

void restinio::websocket::basic::impl::message_details_t::set_masking_key | ( | std::uint32_t | value | ) |

inline

Set masking key.

Definition at line 100 of file ws_parser.hpp.

## Member Data Documentation

## m_ext_payload_len

std::uint64_t restinio::websocket::basic::impl::message_details_t::m_ext_payload_len = 0

Ext payload len.

Definition at line 129 of file ws_parser.hpp.

## m_final_flag

bool restinio::websocket::basic::impl::message_details_t::m_final_flag = true

Final flag.

Definition at line 107 of file ws_parser.hpp.

## m_mask_flag

bool restinio::websocket::basic::impl::message_details_t::m_mask_flag = false

Mask flag.

Definition at line 120 of file ws_parser.hpp.

## m_masking_key

std::uint32_t restinio::websocket::basic::impl::message_details_t::m_masking_key = 0

Masking key.

Definition at line 132 of file ws_parser.hpp.

## m_opcode

opcode_t restinio::websocket::basic::impl::message_details_t::m_opcode = opcode_t::continuation_frame

Opcode.

Definition at line 117 of file ws_parser.hpp.

## m_payload_len

std::uint8_t restinio::websocket::basic::impl::message_details_t::m_payload_len = 0

Payload len.

It contains payload len or ext payload len code.

Definition at line 126 of file ws_parser.hpp.

## m_rsv1_flag

bool restinio::websocket::basic::impl::message_details_t::m_rsv1_flag = false

Reserved flags.

Definition at line 111 of file ws_parser.hpp.

## m_rsv2_flag

bool restinio::websocket::basic::impl::message_details_t::m_rsv2_flag = false

Definition at line 112 of file ws_parser.hpp.

## m_rsv3_flag

bool restinio::websocket::basic::impl::message_details_t::m_rsv3_flag = false

Definition at line 113 of file ws_parser.hpp.

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

- restinio/websocket/impl/ws_parser.hpp