circuitpython/extmod
Paul Sokolovsky 0719c936fb 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.
2017-11-02 00:14:11 +02:00
..
crypto-algorithms extmod/crypto-algorithms/sha256: Remove non-standard memory.h header. 2017-04-27 15:01:01 +03:00
lwip-include all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
re1.5 extmod/re1.5: Upgrade to v0.8.2, adds hook for stack overflow checking. 2017-10-02 21:20:47 +03:00
uzlib extmod/uzlib: Update to upstream v2.1. 2016-10-11 07:13:23 +03:00
machine_i2c.c all: Convert remaining "mp_uint_t n_args" to "size_t n_args". 2017-08-30 10:59:58 +10:00
machine_i2c.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_mem.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
machine_mem.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
machine_pinbase.c extmod/machine_pinbase: Put PinBase singleton in ROM. 2017-09-12 16:00:21 +10:00
machine_pinbase.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pulse.c extmod/machine_pulse: Make time_pulse_us() not throw exceptions. 2017-02-05 14:20:17 +03:00
machine_pulse.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_signal.c extmod/machine_signal: Fix parsing of invert arg when Pin is first arg. 2017-07-26 12:51:46 +10:00
machine_signal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_spi.c extmod/machine_spi: Remove EVENT_POLL_HOOK from soft-SPI transfer func. 2017-02-06 14:38:33 +11:00
machine_spi.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
misc.h extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index. 2017-10-13 20:01:57 +11:00
modbtree.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modframebuf.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modlwip.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
modonewire.c extmod/mod{lwip,onewire,webrepl}: Convert to mp_rom_map_elem_t. 2017-07-29 18:24:16 +03:00
modubinascii.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modubinascii.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
moductypes.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduhashlib.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduheapq.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modujson.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modurandom.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modure.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduselect.c all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
modussl_axtls.c extmod/modussl_axtls: socket_read: Handle EAGAIN. 2017-11-02 00:14:11 +02:00
modussl_mbedtls.c extmod/modussl_mbedtls: Allow to compile with unix coverage build. 2017-10-30 15:41:37 +11:00
modutimeq.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
moduzlib.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modwebrepl.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
modwebsocket.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modwebsocket.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
uos_dupterm.c extmod/uos_dupterm: Swallow any errors from dupterm closing the stream. 2017-10-19 14:10:17 +11:00
utime_mphal.c py,extmod: Some casts and minor refactors to quiet compiler warnings. 2017-07-07 11:32:22 +10:00
utime_mphal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs_fat_diskio.c all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
vfs_fat_file.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_fat_misc.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_fat.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_fat.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
vfs_reader.c py: Allow lexer to raise exceptions during construction. 2017-03-14 11:52:05 +11:00
vfs.c extmod/vfs: Replace VLA in proxy func with small, static sized array. 2017-10-27 18:01:25 +11:00
vfs.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
virtpin.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
virtpin.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00