Damien George
aab005c75b
extmod/modusocket: Provide config macro for socket.listen backlog deflt.
...
To make it possible to change this value for any given port or board.
Signed-off-by: Damien George <damien@micropython.org>
2022-04-11 15:28:56 +10:00
Jon Bjarni Bjarnason
919f696ad2
extmod/modusocket: Implement optional socket.listen backlog argument.
...
This follows the CPython change: https://bugs.python.org/issue21455
Socket listen backlog defaults to 2 if not given, based on most bare metal
targets not having many resources for a large backlog. On UNIX it defaults
to SOMAXCONN or 128, whichever is less.
2022-04-11 15:26:47 +10:00
Damien George
9438fb7321
extmod/modusocket: Support additional args to getaddrinfo.
...
Signed-off-by: Damien George <damien@micropython.org>
2022-01-21 13:40:06 +11:00
iabdalkader
a63875d5ad
extmod/modusocket: Create new sockets in blocking mode.
...
To conform with CPython and other MicroPython ports.
2022-01-21 13:34:56 +11:00
iabdalkader
155eb1361e
extmod/modusocket: Add makefile() method and common socket options.
2022-01-21 13:34:06 +11:00
iabdalkader
b23178a9c0
extmod/modusocket: Make setsockopt return if NIC is not connected.
2022-01-21 13:32:09 +11:00
iabdalkader
842da93011
extmod/modusocket: Initialise accepted socket state.
2022-01-12 14:37:32 +11:00
iabdalkader
67420de4f4
extmod/modusocket: Allow setting timeout on unbound sockets.
...
For an extended state socket, if settimeout() is called before a NIC is
bound, save the timeout until the NIC is bound.
2022-01-12 14:36:55 +11:00
iabdalkader
38f8e852e0
rp2: Add framework for networking.
...
MICROPY_PY_NETWORK and MICROPY_PY_USOCKET need to be enabled by a board to
get networking. No NICs have yet been defined.
2021-09-19 23:20:13 +10:00
iabdalkader
d9749f90ad
extmod/modnetwork: Remove modnetwork socket u_state member.
...
To simplify the socket state.
The CC3K driver (see drivers/cc3000/inc/socket.h and src/socket.c) has
socket() returning an INT16 so there is now enough room to store it
directly in the fileno member.
2021-09-15 11:29:02 +10:00
iabdalkader
c13e25c329
extmod/modusocket: Add read/write stream methods to socket object.
...
Following other socket implementations.
2021-09-15 01:28:37 +10:00
iabdalkader
e7429389a6
extmod/modnetwork: Add extended socket state.
2021-09-15 01:26:23 +10:00
iabdalkader
7aab0dc5d8
extmod: Move modnetwork and modusocket from stm32 to extmod.
...
So they can be used by other ports.
2021-09-15 01:25:12 +10:00