1from queue import Queue 2from types import TracebackType 3from typing import Any, List, Optional, Tuple, Type, TypeVar, Union 4 5families: List[None] 6 7_ConnectionT = TypeVar("_ConnectionT", bound=Connection) 8_ListenerT = TypeVar("_ListenerT", bound=Listener) 9_Address = Union[str, Tuple[str, int]] 10 11class Connection(object): 12 _in: Any 13 _out: Any 14 recv: Any 15 recv_bytes: Any 16 send: Any 17 send_bytes: Any 18 def __enter__(self: _ConnectionT) -> _ConnectionT: ... 19 def __exit__( 20 self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] 21 ) -> None: ... 22 def __init__(self, _in: Any, _out: Any) -> None: ... 23 def close(self) -> None: ... 24 def poll(self, timeout: float = ...) -> bool: ... 25 26class Listener(object): 27 _backlog_queue: Optional[Queue[Any]] 28 @property 29 def address(self) -> Optional[Queue[Any]]: ... 30 def __enter__(self: _ListenerT) -> _ListenerT: ... 31 def __exit__( 32 self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] 33 ) -> None: ... 34 def __init__(self, address: Optional[_Address] = ..., family: Optional[int] = ..., backlog: int = ...) -> None: ... 35 def accept(self) -> Connection: ... 36 def close(self) -> None: ... 37 38def Client(address: _Address) -> Connection: ... 39def Pipe(duplex: bool = ...) -> Tuple[Connection, Connection]: ... 40