Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
websocket_request Struct Reference

Websocket client connection request. More...

#include <websocket.h>

Data Fields

const char * host
 Host of the Websocket server when doing HTTP handshakes.
 
const char * url
 URL of the Websocket.
 
http_header_cb_t optional_headers_cb
 User supplied callback function to call when optional headers need to be sent.
 
const char ** optional_headers
 A NULL terminated list of any optional headers that should be added to the HTTP request.
 
websocket_connect_cb_t cb
 User supplied callback function to call when a connection is established.
 
const struct http_parser_settingshttp_cb
 User supplied list of callback functions if the calling application wants to know the parsing status or the HTTP fields during the handshake.
 
uint8_ttmp_buf
 User supplied buffer where HTTP connection data is stored.
 
size_t tmp_buf_len
 Length of the user supplied temp buffer.
 

Detailed Description

Websocket client connection request.

This contains all the data that is needed when doing a Websocket connection request.

Field Documentation

◆ cb

websocket_connect_cb_t websocket_request::cb

User supplied callback function to call when a connection is established.

◆ host

const char* websocket_request::host

Host of the Websocket server when doing HTTP handshakes.

◆ http_cb

const struct http_parser_settings* websocket_request::http_cb

User supplied list of callback functions if the calling application wants to know the parsing status or the HTTP fields during the handshake.

This is optional parameter and normally not needed but is useful if the caller wants to know something about the fields that the server is sending.

◆ optional_headers

const char** websocket_request::optional_headers

A NULL terminated list of any optional headers that should be added to the HTTP request.

May be NULL. If the optional_headers_cb is specified, then this field is ignored.

◆ optional_headers_cb

http_header_cb_t websocket_request::optional_headers_cb

User supplied callback function to call when optional headers need to be sent.

This can be NULL, in which case the optional_headers field in http_request is used. The idea of this optional_headers callback is to allow user to send more HTTP header data that is practical to store in allocated memory.

◆ tmp_buf

uint8_t* websocket_request::tmp_buf

User supplied buffer where HTTP connection data is stored.

◆ tmp_buf_len

size_t websocket_request::tmp_buf_len

Length of the user supplied temp buffer.

◆ url

const char* websocket_request::url

URL of the Websocket.


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