NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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.

Enumeration Type Documentation

Enumerator
continuation 
text 
binary 
rsv3 
rsv4 
rsv5 
rsv6 
rsv7 
close 
ping 
pong 
control_rsvb 
control_rsvc 
control_rsvd 
control_rsve 
control_rsvf 
CONTINUATION 
TEXT 
BINARY 
RSV3 
RSV4 
RSV5 
RSV6 
RSV7 
CLOSE 
PING 
PONG 
CONTROL_RSVB 
CONTROL_RSVC 
CONTROL_RSVD 
CONTROL_RSVE 
CONTROL_RSVF 

Definition at line 77 of file frame.hpp.

Function Documentation

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.

References control_rsvb, control_rsvf, rsv3, and rsv7.

Referenced by websocketpp::processor::hybi13< stub_config >::validate_incoming_basic_header().

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.

Referenced by websocketpp::processor::hybi13< stub_config >::validate_incoming_basic_header().