diff options
| author | microDev <70126934+microDev1@users.noreply.github.com> | 2020-11-08 00:00:01 +0530 |
|---|---|---|
| committer | microDev <70126934+microDev1@users.noreply.github.com> | 2020-11-08 00:00:01 +0530 |
| commit | 479567059e2bb60e2fd5a2d58be26df2a9e6deae (patch) | |
| tree | cf218ca135a99ea99a4bc27fabe81d494153f1d9 /shared-bindings/socket | |
| parent | 80029f6929ebbf6c0a02c5320e59220b0501bd55 (diff) | |
| parent | 18079c5bbe403a25556e19469a349742dca49633 (diff) | |
Merge branch 'main' into rotaryio-S2
Diffstat (limited to 'shared-bindings/socket')
| -rw-r--r-- | shared-bindings/socket/__init__.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c index 38840da5e..799bf28af 100644 --- a/shared-bindings/socket/__init__.c +++ b/shared-bindings/socket/__init__.c @@ -49,7 +49,14 @@ STATIC const mp_obj_type_t socket_type; //| class socket: //| -//| def __init__(self, family: int, type: int, proto: int) -> None: +//| AF_INET: int +//| AF_INET6: int +//| SOCK_STREAM: int +//| SOCK_DGRAM: int +//| SOCK_RAW: int +//| IPPROTO_TCP: int +//| +//| def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None: //| """Create a new socket //| //| :param int family: AF_INET or AF_INET6 @@ -57,12 +64,6 @@ STATIC const mp_obj_type_t socket_type; //| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" //| ... //| -//| AF_INET: int -//| AF_INET6: int -//| SOCK_STREAM: int -//| SOCK_DGRAM: int -//| SOCK_RAW: int -//| STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_arg_check_num(n_args, kw_args, 0, 4, false); |
