I was just trying SSL-Sockets in Micropython and discovered that I can not set the connection to non-blocking as the setblocking()
function is not implemented, yet.
>>> import ussl
>>> import usocket
>>> s = usocket.socket()
>>> adr = usocket.getaddrinfo('myserverwithssl.com', 443)[0][-1]
>>> s.connect(adr)
>>> s_ssl = ussl.wrap_socket(adr)
>>> s_ssl.setblocking(False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NotImplementedError:
Looking forward to the implementation. However, is there another way to achieve nonblocking SSL-Sockets in Micropython?