File tree 1 file changed +2
-10
lines changed 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2352,8 +2352,8 @@ The second approach to socket programming is to use nonblocking sockets. This
2352
2352
adds complexity but is necessary in some applications, notably where
2353
2353
connectivity is via WiFi (see below).
2354
2354
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 .
2357
2357
2358
2358
The use of nonblocking sockets requires some attention to detail. If a
2359
2359
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
2364
2364
nonblocking operation until the required data has been read or written. In
2365
2365
practice a timeout is likely to be required to cope with server outages.
2366
2366
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
-
2375
2367
### 7.6.1 WiFi issues
2376
2368
2377
2369
The ` uasyncio ` stream mechanism is not good at detecting WiFi outages. I have
You can’t perform that action at this time.
0 commit comments