libcoap 4.3.2rc2

Data Fields
coap_ws_state_t Struct Reference
Libcoap Internal API » WebSockets Support

WebSockets session state. More...

`#include <coap_ws_internal.h>`

## Data Fields
coap_session_type_t | state
| Client or Server. More...
uint8_t | up
| WebSockets established. More...
uint8_t | seen_first
| Seen first request/response HTTP header. More...
uint8_t | seen_host
| Seen Host: HTTP header (server) More...
uint8_t | seen_upg
| Seen Upgrade: HTTP header. More...
uint8_t | seen_conn
| Seen Connection: HTTP header. More...
uint8_t | seen_key
| Seen Key: HTTP header. More...
uint8_t | seen_proto
| Seen Protocol: HTTP header. More...
uint8_t | seen_ver
| Seen version: HTTP header (server) More...
uint8_t | sent_close
| Close has been sent. More...
uint8_t | recv_close
| Close has been received. More...
uint16_t | close_reason
| Reason for closing. More...
int | all_hdr_in
| Frame header available. More...
int | hdr_ofs
| Current offset into rd_header. More...
uint8_t | rd_header [COAP_MAX_FS]
| (Partial) frame More...
uint8_t | mask_key [4]
| Masking key. More...
uint32_t | http_ofs
| Current offset into http_hdr. More...
uint8_t | http_hdr [80]
| (Partial) HTTP header More...
size_t | data_ofs
| Offset into user provided buffer. More...
size_t | data_size
| Data size as indicated by WebSocket frame. More...
uint8_t | key [16]
| Random, but agreed key value. More...

## Detailed Description

WebSockets session state.

Definition at line 37 of file coap_ws_internal.h.

## Field Documentation

## ◆ all_hdr_in

int coap_ws_state_t::all_hdr_in

Frame header available.

Definition at line 50 of file coap_ws_internal.h.

## ◆ close_reason

uint16_t coap_ws_state_t::close_reason

Reason for closing.

Definition at line 49 of file coap_ws_internal.h.

## ◆ data_ofs

size_t coap_ws_state_t::data_ofs

Offset into user provided buffer.

Definition at line 56 of file coap_ws_internal.h.

## ◆ data_size

size_t coap_ws_state_t::data_size

Data size as indicated by WebSocket frame.

Definition at line 57 of file coap_ws_internal.h.

## ◆ hdr_ofs

int coap_ws_state_t::hdr_ofs

Current offset into rd_header.

Definition at line 51 of file coap_ws_internal.h.

## ◆ http_hdr

uint8_t coap_ws_state_t::http_hdr[80]

(Partial) HTTP header

Definition at line 55 of file coap_ws_internal.h.

## ◆ http_ofs

uint32_t coap_ws_state_t::http_ofs

Current offset into http_hdr.

Definition at line 54 of file coap_ws_internal.h.

## ◆ key

uint8_t coap_ws_state_t::key[16]

Random, but agreed key value.

Definition at line 58 of file coap_ws_internal.h.

## ◆ mask_key

uint8_t coap_ws_state_t::mask_key[4]

Masking key.

Definition at line 53 of file coap_ws_internal.h.

## ◆ rd_header

uint8_t coap_ws_state_t::rd_header[COAP_MAX_FS]

(Partial) frame

Definition at line 52 of file coap_ws_internal.h.

## ◆ recv_close

uint8_t coap_ws_state_t::recv_close

Close has been received.

Definition at line 48 of file coap_ws_internal.h.

## ◆ seen_conn

uint8_t coap_ws_state_t::seen_conn

Seen Connection: HTTP header.

Definition at line 43 of file coap_ws_internal.h.

## ◆ seen_first

uint8_t coap_ws_state_t::seen_first

Seen first request/response HTTP header.

Definition at line 40 of file coap_ws_internal.h.

## ◆ seen_host

uint8_t coap_ws_state_t::seen_host

Seen Host: HTTP header (server)

Definition at line 41 of file coap_ws_internal.h.

## ◆ seen_key

uint8_t coap_ws_state_t::seen_key

Seen Key: HTTP header.

Definition at line 44 of file coap_ws_internal.h.

## ◆ seen_proto

uint8_t coap_ws_state_t::seen_proto

Seen Protocol: HTTP header.

Definition at line 45 of file coap_ws_internal.h.

## ◆ seen_upg

uint8_t coap_ws_state_t::seen_upg

Seen Upgrade: HTTP header.

Definition at line 42 of file coap_ws_internal.h.

## ◆ seen_ver

uint8_t coap_ws_state_t::seen_ver

Seen version: HTTP header (server)

Definition at line 46 of file coap_ws_internal.h.

## ◆ sent_close

uint8_t coap_ws_state_t::sent_close

Close has been sent.

Definition at line 47 of file coap_ws_internal.h.

## ◆ state

coap_session_type_t coap_ws_state_t::state

Client or Server.

Definition at line 38 of file coap_ws_internal.h.

## ◆ up

uint8_t coap_ws_state_t::up

WebSockets established.

Definition at line 39 of file coap_ws_internal.h.

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

- coap_ws_internal.h