Chapter 2. API Reference
int payload_len
Total payload length, payloads exceeding buffer will be posted through multiple events
int payload_offset
Actual offset for the data associated with this event
struct esp_websocket_client_config_t
Websocket client setup configuration.
Public Members
const char *uri
Websocket URI, the information on the URI can be overrides the other fields below, if any
const char *host
Domain or IP as string
int port
Port to connect, default depend on esp_websocket_transport_t (80 or 443)
const char *username
Using for Http authentication - Not supported for now
const char *password
Using for Http authentication - Not supported for now
const char *path
HTTP Path, if not set, default is /
bool disable_auto_reconnect
Disable the automatic reconnect function when disconnected
void *user_context
HTTP user data context
int task_prio
Websocket task priority
int task_stack
Websocket task stack
int buffer_size
Websocket buffer size
const char *cert_pem
Pointer to certificate data in PEM or DER format for server verify (with SSL), default is NULL, not re-
quired to verify the server. PEM-format must have a terminating NULL-character. DER-format requires
the length to be passed in cert_len.
size_t cert_len
Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem
const char *client_cert
Pointer to certificate data in PEM or DER format for SSL mutual authentication, default is NULL, not
required if mutual authentication is not needed. If it is not NULL, also client_key has to be provided.
PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in
client_cert_len.
size_t client_cert_len
Length of the buffer pointed to by client_cert. May be 0 for null-terminated pem
const char *client_key
Pointer to private key data in PEM or DER format for SSL mutual authentication, default is NULL,
not required if mutual authentication is not needed. If it is not NULL, also client_cert has to be
provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be
passed in client_key_len
Espressif Systems 647
Submit Document Feedback
Release v4.4