Skip to content

Commit 3e8a1e8

Browse files
committed
Tutorial: update and correct section on sockets.
1 parent e444725 commit 3e8a1e8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

v3/docs/TUTORIAL.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,8 +2352,8 @@ The second approach to socket programming is to use nonblocking sockets. This
23522352
adds complexity but is necessary in some applications, notably where
23532353
connectivity is via WiFi (see below).
23542354

2355-
At the time of writing (March 2019) support for TLS on nonblocking sockets is
2356-
under development. Its exact status is unknown (to me).
2355+
Support for TLS on nonblocking sockets is platform dependent. It works on ESP32
2356+
and Pyboard D. It does not work on ESP8266.
23572357

23582358
The use of nonblocking sockets requires some attention to detail. If a
23592359
nonblocking read is performed, because of server latency, there is no guarantee
@@ -2364,14 +2364,6 @@ Hence asynchronous read and write methods need to iteratively perform the
23642364
nonblocking operation until the required data has been read or written. In
23652365
practice a timeout is likely to be required to cope with server outages.
23662366

2367-
A further complication is that the ESP32 port had issues which required rather
2368-
unpleasant hacks for error-free operation. I have not tested whether this is
2369-
still the case.
2370-
2371-
The file [sock_nonblock.py](./sock_nonblock.py) illustrates the sort of
2372-
techniques required. It is not a working demo, and solutions are likely to be
2373-
application dependent.
2374-
23752367
### 7.6.1 WiFi issues
23762368

23772369
The `uasyncio` stream mechanism is not good at detecting WiFi outages. I have

0 commit comments

Comments
 (0)