WebSocket client structure.
This structure holds the state and configuration of a WebSocket client, including socket descriptors, connection state, and callback functions. This is not a user configurable structure.
Public Attributes#
BSD socket file descriptor.
WebSocket server host (for example, "example.com").
WebSocket resource path (for example, "/chat").
WebSocket server port number.
Local client port number.
WebSocket server IP address.
Masking key for client-to-server frames (used in hosted mode).
WebSocket connection state.
Data receive callback function.
Callback function for remote termination event.
Enable SSL for WebSocket connection.
User-defined context (for future reference).
Public Attribute Documentation#
socket_fd#
int sl_websocket_client_s::socket_fd
BSD socket file descriptor.
115
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
host#
char sl_websocket_client_s::host[SL_SI91X_WEBSOCKET_MAX_HOST_LENGTH]
WebSocket server host (for example, "example.com").
116
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
resource#
char sl_websocket_client_s::resource[SL_SI91X_WEBSOCKET_MAX_RESOURCE_LENGTH]
WebSocket resource path (for example, "/chat").
117
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
server_port#
uint16_t sl_websocket_client_s::server_port
WebSocket server port number.
118
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
client_port#
uint16_t sl_websocket_client_s::client_port
Local client port number.
119
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
ip_address#
sl_ip_address_t sl_websocket_client_s::ip_address
WebSocket server IP address.
120
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
mask_key#
uint8_t sl_websocket_client_s::mask_key[4]
Masking key for client-to-server frames (used in hosted mode).
121
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
state#
sl_websocket_state_t sl_websocket_client_s::state
WebSocket connection state.
122
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
data_cb#
sl_si91x_socket_receive_data_callback_t sl_websocket_client_s::data_cb
Data receive callback function.
123
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
remote_terminate_cb#
sl_si91x_socket_remote_termination_callback_t sl_websocket_client_s::remote_terminate_cb
Callback function for remote termination event.
125
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
enable_ssl#
bool sl_websocket_client_s::enable_ssl
Enable SSL for WebSocket connection.
126
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h
user_context#
void* sl_websocket_client_s::user_context
User-defined context (for future reference).
127
of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h