diff options
| author | Lucian Copeland <hierophect@gmail.com> | 2020-11-10 14:59:32 -0500 |
|---|---|---|
| committer | Lucian Copeland <hierophect@gmail.com> | 2020-11-10 14:59:32 -0500 |
| commit | 21ca1b8c2bcf5be54117e2de0381eb956e60d0df (patch) | |
| tree | 6dd265af0965265912972c8c2eadfed44ced4d11 /shared-bindings/socketpool/SocketPool.c | |
| parent | d16d27a4491c3e0e5ad4c0a10344e9865b8a1fe2 (diff) | |
| parent | 75a977febd27fc69f2c2dc3c017e765d215be633 (diff) | |
Merge remote-tracking branch 'upstream/main' into esp32s2-udp
Diffstat (limited to 'shared-bindings/socketpool/SocketPool.c')
| -rw-r--r-- | shared-bindings/socketpool/SocketPool.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 527cf7e98..73eeed265 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -57,8 +57,14 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(s); } - -//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None: +//| AF_INET: int +//| AF_INET6: int +//| SOCK_STREAM: int +//| SOCK_DGRAM: int +//| SOCK_RAW: int +//| IPPROTO_TCP: int +//| +//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> socketpool.Socket: //| """Create a new socket //| //| :param ~int family: AF_INET or AF_INET6 @@ -66,6 +72,7 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t //| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" //| ... //| + STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { mp_arg_check_num(n_args, kw_args, 0, 5, false); @@ -82,7 +89,7 @@ STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_ } MP_DEFINE_CONST_FUN_OBJ_KW(socketpool_socketpool_socket_obj, 1, socketpool_socketpool_socket); -//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> tuple: +//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> Tuple[int, int, int, str, Tuple[str, int]]: //| """Gets the address information for a hostname and port //| //| Returns the appropriate family, socket type, socket protocol and |
