WebSocket++  0.8.3-dev
C++ websocket client/server library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Enumerations | Functions
websocketpp::frame::opcode Namespace Reference

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

Detailed Description

Constants and utility functions related to WebSocket opcodes.

WebSocket Opcodes are 4 bits. See RFC6455 section 5.2.

Function Documentation

◆ invalid()

bool websocketpp::frame::opcode::invalid ( value  v)
inline

Check if an opcode is invalid.

Invalid opcodes are negative or require greater than 4 bits to store.

Parameters
vThe opcode to test.
Returns
Whether or not the opcode is invalid.

Definition at line 130 of file frame.hpp.

◆ is_control()

bool websocketpp::frame::opcode::is_control ( value  v)
inline

Check if an opcode is for a control frame.

Parameters
vThe opcode to test.
Returns
Whether or not the opcode is a control opcode.

Definition at line 139 of file frame.hpp.

◆ reserved()

bool websocketpp::frame::opcode::reserved ( value  v)
inline

Check if an opcode is reserved.

Parameters
vThe opcode to test.
Returns
Whether or not the opcode is reserved.

Definition at line 118 of file frame.hpp.