@@ -64,15 +64,12 @@ class CommonSocketType(Protocol):
64
64
def send (self , data : bytes , flags : int = ...) -> None :
65
65
"""Send data to the socket. The meaning of the optional flags kwarg is
66
66
implementation-specific."""
67
- ...
68
67
69
68
def settimeout (self , value : Optional [float ]) -> None :
70
69
"""Set a timeout on blocking socket operations."""
71
- ...
72
70
73
71
def close (self ) -> None :
74
72
"""Close the socket."""
75
- ...
76
73
77
74
class CommonCircuitPythonSocketType (CommonSocketType , Protocol ):
78
75
"""Describes the common structure every CircuitPython socket type must have."""
@@ -84,7 +81,6 @@ def connect(
84
81
) -> None :
85
82
"""Connect to a remote socket at the provided (host, port) address. The conntype
86
83
kwarg optionally may indicate SSL or not, depending on the underlying interface."""
87
- ...
88
84
89
85
class LegacyCircuitPythonSocketType (CommonCircuitPythonSocketType , Protocol ):
90
86
"""Describes the structure a legacy CircuitPython socket type must have."""
@@ -93,7 +89,6 @@ def recv(self, bufsize: int = ...) -> bytes:
93
89
"""Receive data from the socket. The return value is a bytes object representing
94
90
the data received. The maximum amount of data to be received at once is specified
95
91
by bufsize."""
96
- ...
97
92
98
93
class SupportsRecvWithFlags (Protocol ):
99
94
"""Describes a type that posseses a socket recv() method supporting the flags kwarg."""
@@ -102,7 +97,6 @@ def recv(self, bufsize: int = ..., flags: int = ...) -> bytes:
102
97
"""Receive data from the socket. The return value is a bytes object representing
103
98
the data received. The maximum amount of data to be received at once is specified
104
99
by bufsize. The meaning of the optional flags kwarg is implementation-specific."""
105
- ...
106
100
107
101
class SupportsRecvInto (Protocol ):
108
102
"""Describes a type that possesses a socket recv_into() method."""
@@ -114,7 +108,6 @@ def recv_into(
114
108
buffer. If nbytes is not specified (or 0), receive up to the size available in the
115
109
given buffer. The meaning of the optional flags kwarg is implementation-specific.
116
110
Returns the number of bytes received."""
117
- ...
118
111
119
112
class CircuitPythonSocketType (
120
113
CommonCircuitPythonSocketType ,
@@ -124,16 +117,13 @@ class CircuitPythonSocketType(
124
117
): # pylint: disable=too-many-ancestors
125
118
"""Describes the structure every modern CircuitPython socket type must have."""
126
119
127
- ...
128
-
129
120
class StandardPythonSocketType (
130
121
CommonSocketType , SupportsRecvInto , SupportsRecvWithFlags , Protocol
131
122
):
132
123
"""Describes the structure every standard Python socket type must have."""
133
124
134
125
def connect (self , address : Union [Tuple [Any , ...], str , bytes ]) -> None :
135
126
"""Connect to a remote socket at the provided address."""
136
- ...
137
127
138
128
SocketType = Union [
139
129
LegacyCircuitPythonSocketType ,
@@ -149,7 +139,6 @@ class InterfaceType(Protocol):
149
139
@property
150
140
def TLS_MODE (self ) -> int : # pylint: disable=invalid-name
151
141
"""Constant representing that a socket's connection mode is TLS."""
152
- ...
153
142
154
143
SSLContextType = Union [SSLContext , "_FakeSSLContext" ]
155
144
0 commit comments