13#ifndef ZEPHYR_INCLUDE_NET_WEBSOCKET_H_ 
   14#define ZEPHYR_INCLUDE_NET_WEBSOCKET_H_ 
   34#define WEBSOCKET_FLAG_FINAL  0x00000001  
   35#define WEBSOCKET_FLAG_TEXT   0x00000002  
   36#define WEBSOCKET_FLAG_BINARY 0x00000004  
   37#define WEBSOCKET_FLAG_CLOSE  0x00000008  
   38#define WEBSOCKET_FLAG_PING   0x00000010  
   39#define WEBSOCKET_FLAG_PONG   0x00000020  
  188#if defined(CONFIG_WEBSOCKET_CLIENT) 
ZTEST_BMEM int timeout
Definition: main.c:31
 
int(* http_header_cb_t)(int sock, struct http_request *req, void *user_data)
Callback can be used if application wants to construct additional HTTP headers when the HTTP request ...
Definition: client.h:79
 
int websocket_recv_msg(int ws_sock, uint8_t *buf, size_t buf_len, uint32_t *message_type, uint64_t *remaining, int32_t timeout)
Receive websocket msg from peer.
 
websocket_opcode
Definition: websocket.h:41
 
int(* websocket_connect_cb_t)(int ws_sock, struct http_request *req, void *user_data)
Callback called after Websocket connection is established.
Definition: websocket.h:60
 
int websocket_connect(int http_sock, struct websocket_request *req, int32_t timeout, void *user_data)
Connect to a server that provides Websocket service. The callback is called after connection is estab...
 
static void websocket_init(void)
Definition: websocket.h:191
 
int websocket_send_msg(int ws_sock, const uint8_t *payload, size_t payload_len, enum websocket_opcode opcode, bool mask, bool final, int32_t timeout)
Send websocket msg to peer.
 
int websocket_disconnect(int ws_sock)
Close websocket.
 
@ WEBSOCKET_OPCODE_PONG
Definition: websocket.h:47
 
@ WEBSOCKET_OPCODE_DATA_TEXT
Definition: websocket.h:43
 
@ WEBSOCKET_OPCODE_CLOSE
Definition: websocket.h:45
 
@ WEBSOCKET_OPCODE_CONTINUE
Definition: websocket.h:42
 
@ WEBSOCKET_OPCODE_DATA_BINARY
Definition: websocket.h:44
 
@ WEBSOCKET_OPCODE_PING
Definition: websocket.h:46
 
IPv6 and IPv4 definitions.
 
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
 
__INT32_TYPE__ int32_t
Definition: stdint.h:74
 
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
 
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
 
Definition: websocket.h:67
 
size_t tmp_buf_len
Definition: websocket.h:105
 
const struct http_parser_settings * http_cb
Definition: websocket.h:99
 
const char * url
Definition: websocket.h:72
 
const char ** optional_headers
Definition: websocket.h:86
 
const char * host
Definition: websocket.h:69
 
uint8_t * tmp_buf
Definition: websocket.h:102
 
websocket_connect_cb_t cb
Definition: websocket.h:91
 
http_header_cb_t optional_headers_cb
Definition: websocket.h:80
 
static const intptr_t user_data[5]
Definition: main.c:588