summaryrefslogtreecommitdiff
path: root/shared-bindings/socketpool/SocketPool.c
diff options
context:
space:
mode:
authoraskpatricw <4002194+askpatrickw@users.noreply.github.com>2020-12-15 15:43:27 -0800
committeraskpatricw <4002194+askpatrickw@users.noreply.github.com>2020-12-15 15:43:27 -0800
commit1d37d3f43b528f528816f066435fa87adf811b90 (patch)
treeec70bd9ad59fb43655854be9e2e06f20c5b1c6c0 /shared-bindings/socketpool/SocketPool.c
parente2c833adf468cd84f8dfcc03cf47de9da0c34b1f (diff)
parenta2d2d699e4d431d4459eae172444bd569559ff02 (diff)
Merge branch 'main' of https://github.com/adafruit/circuitpython into main
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