Skip to content

Commit 44d476f

Browse files
committed
docs(websocket): fix minor readability issues
1 parent 55385ec commit 44d476f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/esp_websocket_client/en/index.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ Configuration:
6666
.. 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.
6767

6868
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).
70-
```
71-
echo "" | openssl s_client -showcerts -connect websocket.org:443 | sed -n "1,/Root/d; /BEGIN/,/END/p" | openssl x509 -outform PEM >websocket_org.pem
72-
```
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). ::
70+
71+
echo "" | openssl s_client -showcerts -connect websocket.org:443 \
72+
| sed -n "1,/Root/d; /BEGIN/,/END/p" \
73+
| openssl x509 -outform PEM \
74+
> websocket_org.pem
7375

7476
This command will extract the second certificate in the chain and save it as a pem-file.
7577

@@ -119,14 +121,14 @@ For more options on :cpp:type:`esp_websocket_client_config_t`, please refer to A
119121

120122
Events
121123
------
122-
* `WEBSOCKET_EVENT_BEGIN': The client thread is running.
124+
* `WEBSOCKET_EVENT_BEGIN`: The client thread is running.
123125
* `WEBSOCKET_EVENT_BEFORE_CONNECT`: The client is about to connect.
124126
* `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.
125127
* `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.
126128
* `WEBSOCKET_EVENT_ERROR`: The client has experienced an error. Examples include transport write or read failures.
127129
* `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.
128130
* `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.
130132

131133
If the client handle is needed in the event handler it can be accessed through the pointer passed to the event handler:
132134

0 commit comments

Comments
 (0)