Loading...
Searching...
No Matches
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.
uint8_t | up
| WebSockets established.
uint8_t | seen_first
| Seen first request/response HTTP header.
uint8_t | seen_host
| Seen Host: HTTP header (server).
uint8_t | seen_upg
| Seen Upgrade: HTTP header.
uint8_t | seen_conn
| Seen Connection: HTTP header.
uint8_t | seen_key
| Seen Key: HTTP header.
uint8_t | seen_proto
| Seen Protocol: HTTP header.
uint8_t | seen_ver
| Seen version: HTTP header (server).
uint8_t | sent_close
| Close has been sent.
uint8_t | recv_close
| Close has been received.
uint16_t | close_reason
| Reason for closing.
int | all_hdr_in
| Frame header available.
int | hdr_ofs
| Current offset into rd_header.
uint8_t | rd_header [COAP_MAX_FS]
| (Partial) frame
uint8_t | mask_key [4]
| Masking key.
uint32_t | http_ofs
| Current offset into http_hdr.
uint8_t | http_hdr [160]
| (Partial) HTTP header
size_t | data_ofs
| Offset into user provided buffer.
size_t | data_size
| Data size as indicated by WebSocket frame.
uint8_t | key [16]
| Random, but agreed key value.

## 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[160]

(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