-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy path_abc.py
More file actions
53 lines (37 loc) · 1.18 KB
/
Copy path_abc.py
File metadata and controls
53 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from __future__ import annotations
import socket
from ._types import ResolvedAddress
class SyncResolver:
def resolve(
self,
host: str,
port: int = 0,
family: socket.AddressFamily = socket.AF_UNSPEC,
) -> ResolvedAddress:
raise NotImplementedError
class AsyncResolver:
async def resolve(
self,
host: str,
port: int = 0,
family: socket.AddressFamily = socket.AF_UNSPEC,
) -> ResolvedAddress:
raise NotImplementedError
class SyncSocketStream:
def write(self, data: bytes) -> None:
raise NotImplementedError
def read(self, max_bytes: int = ...) -> bytes:
raise NotImplementedError
def read_exactly(self, n: int) -> bytes:
raise NotImplementedError
def close(self) -> None:
raise NotImplementedError
class AsyncSocketStream:
async def write(self, data: bytes) -> None:
raise NotImplementedError
async def read(self, max_bytes: int = ...) -> bytes:
raise NotImplementedError
async def read_exactly(self, n: int) -> bytes:
raise NotImplementedError
async def close(self) -> None:
raise NotImplementedError