summaryrefslogtreecommitdiff
path: root/docs/esp8266
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-11-02 00:14:11 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-11-02 00:14:11 +0200
commit0719c936fb036f0dd3107cd8bd262d80f95c3ca7 (patch)
tree4446b06debea7c3600e114e37d2985921e3361c2 /docs/esp8266
parent3a9b15fd79c1d1692d529b2b281e2862e9b31179 (diff)
extmod/modussl_axtls: socket_read: Handle EAGAIN.
If SSL_EAGAIN is returned (which is a feature of MicroPython's axTLS fork), return EAGAIN. Original axTLS returns SSL_OK both when there's no data to return to user yet and when the underlying stream returns EAGAIN. That's not distinctive enough, for example, original module code works well for blocking stream, but will infinite-loop for non-blocking socket with EAGAIN. But if we fix non-blocking case, blocking calls to .read() will return few None's initially (while axTLS progresses thru handshake). Using SSL_EAGAIN allows to fix non-blocking case without regressing the blocking one. Note that this only handles case of non-blocking reads of application data. Initial handshake and writes still don't support non-blocking mode and must be done in the blocking way.
Diffstat (limited to 'docs/esp8266')
0 files changed, 0 insertions, 0 deletions