summaryrefslogtreecommitdiff
path: root/shared-bindings/socketpool/SocketPool.c
diff options
context:
space:
mode:
authorMark <56205165+gamblor21@users.noreply.github.com>2020-12-01 15:47:16 -0600
committerGitHub <noreply@github.com>2020-12-01 15:47:16 -0600
commit237385798cb6989a5ed13e120c3cc5e2415af935 (patch)
tree932aa4302e84bd59f84c29c2364f9c6d75192fb2 /shared-bindings/socketpool/SocketPool.c
parent23ed3ef971f8f38497337874da39273e5ae090d7 (diff)
parent5b3c930e384ef6440f0f7b5167bb54ea68a8be76 (diff)
Merge branch 'main' into bus_device
Diffstat (limited to 'shared-bindings/socketpool/SocketPool.c')
-rw-r--r--shared-bindings/socketpool/SocketPool.c13
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