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#

int

BSD socket file descriptor.

char

WebSocket server host (for example, "example.com").

char

WebSocket resource path (for example, "/chat").

uint16_t

WebSocket server port number.

uint16_t

Local client port number.

sl_ip_address_t

WebSocket server IP address.

uint8_t

Masking key for client-to-server frames (used in hosted mode).

WebSocket connection state.

sl_si91x_socket_receive_data_callback_t

Data receive callback function.

sl_si91x_socket_remote_termination_callback_t

Callback function for remote termination event.

bool

Enable SSL for WebSocket connection.

void *

User-defined context (for future reference).

Public Attribute Documentation#

socket_fd#

int sl_websocket_client_s::socket_fd

BSD socket file descriptor.


Definition at line 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").


Definition at line 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").


Definition at line 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.


Definition at line 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.


Definition at line 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.


Definition at line 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).


Definition at line 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.


Definition at line 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.


Definition at line 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.


Definition at line 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.


Definition at line 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).


Definition at line 127 of file components/service/sl_websocket_client/inc/sl_websocket_client_types.h