circuitpython/extmod
Paul Sokolovsky 5071ceea07 extmod/modlwip: Store a chain of incoming pbufs, instead of only one.
Storing a chain of pbuf was an original design of @pfalcon's lwIP socket
module. The problem with storing just one, like modlwip does is that
"peer closed connection" notification is completely asynchronous and out of
band. So, there may be following sequence of actions:

1. pbuf #1 arrives, and stored in a socket.
2. pbuf #2 arrives, and rejected, which causes lwIP to put it into a
queue to re-deliver later.
3. "Peer closed connection" is signaled, and socket is set at such status.
4. pbuf #1 is processed.
5. There's no stored pbufs in teh socket, and socket status is "peer closed
connection", so EOF is returned to a client.
6. pbuf #2 gets redelivered.

Apparently, there's no easy workaround for this, except to queue all
incoming pbufs in a socket. This may lead to increased memory pressure,
as number of pending packets would be regulated only by TCP/IP flow
control, whereas with previous setup lwIP had a global overlook of number
packets waiting for redelivery and could regulate them centrally.
2016-06-19 19:15:20 +03:00
..
crypto-algorithms extmod/moduhashlib: Add namespace prefix for crypto-algorithms/sha256.h. 2015-12-20 23:14:47 +02:00
lwip-include extmod/lwip: Change void pointers to unions, include new mphal.h file 2015-11-04 23:24:04 +03:00
re1.5 extmod/re1.5: Workaround issue with mingw32-gcc 4.2.1. 2015-11-01 02:39:01 +03:00
uzlib extmod: Update uzlib to 1.2.2. 2016-02-01 23:05:45 +02:00
fsusermount.c extmod: When including extmod headers, prefix path with extmod/. 2016-05-20 12:46:20 +01:00
fsusermount.h extmod/vfs_fat: Object-oriented encapsulation of FatFs VFS. 2016-02-14 19:15:21 +02:00
machine_i2c.c extmod/machine_i2c: Redo mp_hal_pin macros to use open_drain and od_low. 2016-05-26 17:06:40 +01:00
machine_i2c.h extmod: Add generic machine.I2C class, with bit-bang I2C. 2016-04-12 14:06:54 +01:00
machine_mem.c extmod/modmachine: Truncate integers that are to be stored using mem*. 2016-02-10 17:05:03 +00:00
machine_mem.h unix: machine_mem improvements 2015-12-18 22:01:03 +02:00
machine_pinbase.c extmod/machine_pinbase: Fix nanbox build. 2016-06-19 00:26:57 +03:00
machine_pinbase.h extmod/machine_pinbase: Implementation of PinBase class. 2016-06-18 23:40:28 +03:00
machine_pulse.c extmod/machine: Add MICROPY_PY_MACHINE_PULSE config for time_pulse_us. 2016-05-31 14:25:19 +01:00
machine_pulse.h extmod: Add machine time_pulse_us function (at C and Python level). 2016-05-31 13:58:48 +01:00
misc.h extmod/moduos_dupterm: Dumpterm subsystem is responsible for closing stream. 2016-05-20 22:20:37 +03:00
modbtree.c extmod/modbtree: open(): Support "in-memory" database with filename=None. 2016-06-18 01:31:57 +03:00
modframebuf.c extmod: Add initial framebuf module. 2016-04-12 14:06:53 +01:00
modlwip.c extmod/modlwip: Store a chain of incoming pbufs, instead of only one. 2016-06-19 19:15:20 +03:00
modubinascii.c extmod: When including extmod headers, prefix path with extmod/. 2016-05-20 12:46:20 +01:00
modubinascii.h py: Change type signature of builtin funs that take variable or kw args. 2016-01-11 00:49:27 +00:00
moductypes.c extmod/uctypes: Change param type from void* to byte*. 2016-03-19 22:13:17 +00:00
moduhashlib.c extmod/moduhashlib: Use MICROPY_PY_UHASHLIB_SHA1 config define. 2016-01-25 00:49:00 +02:00
moduheapq.c py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR. 2015-11-29 14:25:35 +00:00
modujson.c py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR. 2015-11-29 14:25:35 +00:00
moduos_dupterm.c extmod/moduos_dupterm: Dumpterm subsystem is responsible for closing stream. 2016-05-20 22:20:37 +03:00
modurandom.c extmod/modurandom: Add some extra random functions. 2016-01-26 15:27:00 +00:00
modure.c extmod/modure: re_exec() renamed to ure_exec() due to collison in 4.3BSD. 2016-04-08 20:12:03 +03:00
modussl.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
moduzlib.c py: Change type signature of builtin funs that take variable or kw args. 2016-01-11 00:49:27 +00:00
modwebrepl.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
modwebsocket.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
modwebsocket.h extmod/modwebsocket.h: Split websocket-related defines for reuse. 2016-04-10 13:42:51 +03:00
vfs_fat_diskio.c extmod/vfs_fat_diskio: Actually support sectors != 512 with Python blockdevs. 2016-03-27 14:21:06 +03:00
vfs_fat_ffconf.c extmod/vfs_fat_ffconf: Reusable FatFs module, move from stmhal/ffconf. 2016-02-15 00:19:27 +02:00
vfs_fat_file.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
vfs_fat_file.h extmod/vfs_fat: Move listdir() method from stmhal for reuse. 2016-02-28 17:17:24 +02:00
vfs_fat_lexer.c extmod/vfs_fat_lexer: Add func prototype for pedantic warnings. 2016-03-03 14:53:36 +02:00
vfs_fat_misc.c extmod/vfs_fat*: Replace text error messages by POSIX error numbers. 2016-05-27 23:57:01 +03:00
vfs_fat.c esp8266: Use RTC to set date & time stamps for files. 2016-06-16 19:31:58 +03:00
virtpin.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
virtpin.h extmod/virtpin: Initial implementation of open-ended C-level Pin interface. 2016-05-27 01:08:43 +03:00