Constants and utility functions related to WebSocket opcodes. More...
Enumerations | |
enum | value { continuation = 0x0, text = 0x1, binary = 0x2, rsv3 = 0x3, rsv4 = 0x4, rsv5 = 0x5, rsv6 = 0x6, rsv7 = 0x7, close = 0x8, ping = 0x9, pong = 0xA, control_rsvb = 0xB, control_rsvc = 0xC, control_rsvd = 0xD, control_rsve = 0xE, control_rsvf = 0xF, CONTINUATION = 0x0, TEXT = 0x1, BINARY = 0x2, RSV3 = 0x3, RSV4 = 0x4, RSV5 = 0x5, RSV6 = 0x6, RSV7 = 0x7, CLOSE = 0x8, PING = 0x9, PONG = 0xA, CONTROL_RSVB = 0xB, CONTROL_RSVC = 0xC, CONTROL_RSVD = 0xD, CONTROL_RSVE = 0xE, CONTROL_RSVF = 0xF } |
Functions | |
bool | reserved (value v) |
Check if an opcode is reserved. More... | |
bool | invalid (value v) |
Check if an opcode is invalid. More... | |
bool | is_control (value v) |
Check if an opcode is for a control frame. More... | |
Constants and utility functions related to WebSocket opcodes.
WebSocket Opcodes are 4 bits. See RFC6455 section 5.2.
|
inline |
Check if an opcode is reserved.
v | The opcode to test. |
Definition at line 118 of file frame.hpp.
References control_rsvb, control_rsvf, rsv3, and rsv7.
Referenced by websocketpp::processor::hybi13< stub_config >::validate_incoming_basic_header().
|
inline |
Check if an opcode is invalid.
Invalid opcodes are negative or require greater than 4 bits to store.
v | The opcode to test. |
Definition at line 130 of file frame.hpp.
Referenced by websocketpp::processor::hybi13< stub_config >::validate_incoming_basic_header().
|
inline |
Check if an opcode is for a control frame.
v | The opcode to test. |
Definition at line 139 of file frame.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), websocketpp::processor::hybi13< stub_config >::consume(), websocketpp::processor::hybi13< stub_config >::get_message(), websocketpp::connection< config >::handle_read_frame(), websocketpp::processor::hybi13< stub_config >::prepare_control(), websocketpp::processor::hybi13< stub_config >::prepare_data_frame(), and websocketpp::processor::hybi13< stub_config >::validate_incoming_basic_header().