You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/esp_websocket_client/en/index.rst
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -66,10 +66,12 @@ Configuration:
66
66
.. note:: If you want to verify the server, then you need to provide a certificate in PEM format, and provide to ``cert_pem`` in :cpp:type:`websocket_client_config_t`. If no certficate is provided then the TLS connection will default to not requiring verification.
67
67
68
68
PEM certificate for this example could be extracted from an openssl `s_client` command connecting to websocket.org.
69
-
In case a host operating system has `openssl` and `sed` packages installed, one could execute the following command to download and save the root or intermediate root certificate to a file (Note for Windows users: Both Linux like environment or Windows native packages may be used).
In case a host operating system has `openssl` and `sed` packages installed, one could execute the following command to download and save the root or intermediate root certificate to a file (Note for Windows users: Both Linux like environment or Windows native packages may be used). ::
This command will extract the second certificate in the chain and save it as a pem-file.
75
77
@@ -119,14 +121,14 @@ For more options on :cpp:type:`esp_websocket_client_config_t`, please refer to A
119
121
120
122
Events
121
123
------
122
-
* `WEBSOCKET_EVENT_BEGIN': The client thread is running.
124
+
* `WEBSOCKET_EVENT_BEGIN`: The client thread is running.
123
125
* `WEBSOCKET_EVENT_BEFORE_CONNECT`: The client is about to connect.
124
126
* `WEBSOCKET_EVENT_CONNECTED`: The client has successfully established a connection to the server. The client is now ready to send and receive data. Contains no event data.
125
127
* `WEBSOCKET_EVENT_DATA`: The client has successfully received and parsed a WebSocket frame. The event data contains a pointer to the payload data, the length of the payload data as well as the opcode of the received frame. A message may be fragmented into multiple events if the length exceeds the buffer size. This event will also be posted for non-payload frames, e.g. pong or connection close frames.
126
128
* `WEBSOCKET_EVENT_ERROR`: The client has experienced an error. Examples include transport write or read failures.
127
129
* `WEBSOCKET_EVENT_DISCONNECTED`: The client has aborted the connection due to the transport layer failing to read data, e.g. because the server is unavailable. Contains no event data.
128
130
* `WEBSOCKET_EVENT_CLOSED`: The connection has been closed cleanly.
129
-
* `WEBSOCKET_EVENT_FINISH': The client thread is about to exit.
131
+
* `WEBSOCKET_EVENT_FINISH`: The client thread is about to exit.
130
132
131
133
If the client handle is needed in the event handler it can be accessed through the pointer passed to the event handler:
0 commit comments