Chapter 2. API Reference
size_t client_key_len
Length of the buffer pointed to by client_key_pem. May be 0 for null-terminated pem
esp_websocket_transport_t
Websocket transport type, see `esp_websocket_transport_t
const char *subprotocol
Websocket subprotocol
const char *user_agent
Websocket user-agent
const char *headers
Websocket additional headers
int pingpong_timeout_sec
Period before connection is aborted due to no PONGs received
bool disable_pingpong_discon
Disable auto-disconnect due to no PONG received within pingpong_timeout_sec
bool use_global_ca_store
Use a global ca_store for all the connections in which this bool is set.
bool skip_cert_common_name_check
Skip any validation of server certificate CN field
bool keep_alive_enable
Enable keep-alive timeout
int keep_alive_idle
Keep-alive idle time. Default is 5 (second)
int keep_alive_interval
Keep-alive interval time. Default is 5 (second)
int keep_alive_count
Keep-alive packet retry send count. Default is 3 counts
size_t ping_interval_sec
Websocket ping interval, defaults to 10 seconds if not set
struct ifreq *if_name
The name of interface for data to go through. Use the default interface without setting
Type Definitions
typedef struct esp_websocket_client *esp_websocket_client_handle_t
Enumerations
enum esp_websocket_event_id_t
Websocket Client events id.
Values:
WEBSOCKET_EVENT_ANY = -1
WEBSOCKET_EVENT_ERROR = 0
This event occurs when there are any errors during execution
WEBSOCKET_EVENT_CONNECTED
Once the Websocket has been connected to the server, no data exchange has been performed
WEBSOCKET_EVENT_DISCONNECTED
The connection has been disconnected
WEBSOCKET_EVENT_DATA
When receiving data from the server, possibly multiple portions of the packet
Espressif Systems
transport
648
Submit Document Feedback
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?