Gin
Loading...
Searching...
No Matches
WSHeaderType Struct Reference

WebSocket frame header structure. More...

#include <gin_websocket.h>

Public Types

enum  Opcode {
  CONTINUATION = 0x0 , TEXT_FRAME = 0x1 , BINARY_FRAME = 0x2 , CLOSE = 8 ,
  PING = 9 , PONG = 0xa
}

Public Attributes

unsigned header_size
bool fin
bool mask
Opcode opcode
int N0
uint64_t N
uint8_t masking_key [4]

Detailed Description

WebSocket frame header structure.

Represents the parsed WebSocket frame header according to RFC 6455. Contains frame metadata including opcode, masking information, and payload length.

Frame Types:

  • CONTINUATION: Multi-frame message continuation
  • TEXT_FRAME: UTF-8 text data
  • BINARY_FRAME: Binary data
  • CLOSE: Connection close frame
  • PING: Ping control frame
  • PONG: Pong control frame (response to ping)
See also
WebSocket

Member Enumeration Documentation

◆ Opcode

Enumerator
CONTINUATION 
TEXT_FRAME 
BINARY_FRAME 
CLOSE 
PING 
PONG 

Member Data Documentation

◆ header_size

unsigned WSHeaderType::header_size

◆ fin

bool WSHeaderType::fin

◆ mask

bool WSHeaderType::mask

◆ opcode

Opcode WSHeaderType::opcode

◆ N0

int WSHeaderType::N0

◆ N

uint64_t WSHeaderType::N

◆ masking_key

uint8_t WSHeaderType::masking_key[4]

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