Bug with ussl and socket setblocking(False)
Firmware version: 1.20.0.rc13 [v1.9.4-94bb382]
Pycom product: WiPy 3.0
I believe there is still a bug related to usocket and ussl libraries.
If I use usocket for a connection (without use ussl to wrap it) I can use
read() of usocket WITHOUT block the script
If I wrap the socket (with wrap_socket of ussl module) and use read() of usocket library then the read function block my script.
I read the documentation. The setblocking(False) of usocket is equivalent settimeout(0).
So I think that wrap_socket of ussl module force the timeout of the socket, so setblocking(False) is useless.
Is that correct? How I can use setblocking(False) with ussl and wrap_socket?
I use setblocking(False) and setblocking(True) several times in my script before call read(), so I think I cannot set the timeout in the wrap_socket and call It before my read operations. Because it will work only before a connection I think.
Thank you very much!