diff options
| author | jgillick <j_gillick@yahoo.com> | 2020-11-22 01:07:03 -0800 |
|---|---|---|
| committer | jgillick <j_gillick@yahoo.com> | 2020-11-22 01:07:03 -0800 |
| commit | 63b0bf9075178984276d33bbf0282b24dce33997 (patch) | |
| tree | f23afdc09c957751357170647661ee68fcf8d4b9 /shared-bindings/socketpool/SocketPool.c | |
| parent | 5f0a372a2206c14e4ae206ec7cb879265aa7a38a (diff) | |
| parent | 2f146090444492c344a0260faa151660f5ec3c7a (diff) | |
Merge remote-tracking branch 'origin/main' into thunderpack1.2
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 |
