ws_parser.hpp File Reference
`#include <restinio/exception.hpp>`
`#include <restinio/websocket/message.hpp>`
`#include <restinio/utils/impl/bitops.hpp>`
`#include <cstdint>`
`#include <vector>`
`#include <list>`
`#include <stdexcept>`

Go to the source code of this file.

## Classes

class | restinio::websocket::basic::impl::message_details_t
| Websocket message class with more detailed protocol information. More...
struct | restinio::websocket::basic::impl::expected_data_t
| Data with expected size. More...
class | restinio::websocket::basic::impl::ws_parser_t
| Websocket parser. More...

## Namespaces

namespace | restinio
namespace | restinio::websocket
namespace | restinio::websocket::basic
namespace | restinio::websocket::basic::impl

## Typedefs

using | restinio::websocket::basic::byte_t = unsigned char
| Alias for byte. More...
using | restinio::websocket::basic::raw_data_t = std::string
| Bytes buffer. More...

## Functions

template<typename T >
void | restinio::websocket::basic::impl::read_number_from_big_endian_bytes (T &number, const raw_data_t &data)
| Read number from buffer with network bytes order. More...
template<int Bytes>
void | restinio::websocket::basic::impl::write_number_to_big_endian_bytes (std::uint64_t &number, raw_data_t &data)
| Save number to buffer with network bytes order. More...
void | restinio::websocket::basic::impl::mask_unmask_payload (std::uint32_t masking_key, raw_data_t &payload)
| Do msak/unmask operation with buffer. More...
raw_data_t | restinio::websocket::basic::impl::write_message_details (const message_details_t &message)
| Serialize websocket message details into bytes buffer. More...
raw_data_t | restinio::websocket::basic::impl::write_message_details (final_frame_flag_t final_flag, opcode_t opcode, size_t payload_len)
| Serialize websocket message details into bytes buffer. More...
raw_data_t | restinio::websocket::basic::impl::write_message_details (final_frame_flag_t final_flag, opcode_t opcode, size_t payload_len, std::uint32_t masking_key)
| Serialize websocket message details into bytes buffer. More...

## Variables

constexpr size_t | restinio::websocket::basic::impl::websocket_first_two_bytes_size = 2
| Websocket parser constants. More...
constexpr size_t | restinio::websocket::basic::impl::websocket_max_payload_size_without_ext = 125
constexpr size_t | restinio::websocket::basic::impl::websocket_short_ext_payload_length = 2
constexpr size_t | restinio::websocket::basic::impl::websocket_long_ext_payload_length = 8
constexpr size_t | restinio::websocket::basic::impl::websocket_short_ext_len_code = 126
constexpr size_t | restinio::websocket::basic::impl::websocket_long_ext_len_code = 127
constexpr size_t | restinio::websocket::basic::impl::websocket_masking_key_size = 4
constexpr byte_t | restinio::websocket::basic::impl::bit_flag_7 = 0x80
constexpr byte_t | restinio::websocket::basic::impl::bit_flag_6 = 0x40
constexpr byte_t | restinio::websocket::basic::impl::bit_flag_5 = 0x20
constexpr byte_t | restinio::websocket::basic::impl::bit_flag_4 = 0x10
constexpr byte_t | restinio::websocket::basic::impl::opcode_mask = 0x0F
constexpr byte_t | restinio::websocket::basic::impl::payload_len_mask = 0x7F