18#ifndef COAP_WS_INTERNAL_H_
19#define COAP_WS_INTERNAL_H_
32#define COAP_MAX_FS (2 + 8 + 4)
84#define WS_B0_FIN_BIT 0x80
85#define WS_B0_RSV_MASK 0x70
86#define WS_B0_OP_MASK 0x0f
88#define WS_B1_MASK_BIT 0x80
89#define WS_B1_LEN_MASK 0x7f
114 const uint8_t *data,
size_t datalen);
Pulls together all the internal only header files.
coap_session_type_t
coap_session_type_t values
struct coap_ws_state_t coap_ws_state_t
WebSockets session state.
void coap_ws_establish(coap_session_t *session)
Layer function interface for layer below WebSockets accept/connect being established.
ssize_t coap_ws_write(coap_session_t *session, const uint8_t *data, size_t datalen)
Function interface for websockets data transmission.
void coap_ws_close(coap_session_t *session)
Layer function interface for WebSockets close for a session.
ssize_t coap_ws_read(coap_session_t *session, uint8_t *data, size_t datalen)
Function interface for websockets data receiving.
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
WebSockets session state.
uint8_t up
WebSockets established.
uint8_t recv_close
Close has been received.
uint8_t key[16]
Random, but agreed key value.
uint8_t seen_host
Seen Host: HTTP header (server)
uint8_t seen_ver
Seen version: HTTP header (server)
uint8_t seen_key
Seen Key: HTTP header.
uint16_t close_reason
Reason for closing.
size_t data_ofs
Offset into user provided buffer.
uint8_t http_hdr[160]
(Partial) HTTP header
uint8_t seen_conn
Seen Connection: HTTP header.
size_t data_size
Data size as indicated by WebSocket frame.
uint8_t seen_upg
Seen Upgrade: HTTP header.
uint32_t http_ofs
Current offset into http_hdr.
int all_hdr_in
Frame header available.
int hdr_ofs
Current offset into rd_header.
uint8_t sent_close
Close has been sent.
coap_session_type_t state
Client or Server.
uint8_t rd_header[COAP_MAX_FS]
(Partial) frame
uint8_t seen_proto
Seen Protocol: HTTP header.
uint8_t mask_key[4]
Masking key.
uint8_t seen_first
Seen first request/response HTTP header.