1 from _typeshed import Self
2 from queue import Queue
3 from types import TracebackType
4 from typing import Any, Tuple, Type, Union
8 _Address = Union[str, Tuple[str, int]]
10 class Connection(object):
17 def __enter__(self: Self) -> Self: ...
19 self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
21 def __init__(self, _in: Any, _out: Any) -> None: ...
22 def close(self) -> None: ...
23 def poll(self, timeout: float = ...) -> bool: ...
25 class Listener(object):
26 _backlog_queue: Queue[Any] | None
28 def address(self) -> Queue[Any] | None: ...
29 def __enter__(self: Self) -> Self: ...
31 self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
33 def __init__(self, address: _Address | None = ..., family: int | None = ..., backlog: int = ...) -> None: ...
34 def accept(self) -> Connection: ...
35 def close(self) -> None: ...
37 def Client(address: _Address) -> Connection: ...
38 def Pipe(duplex: bool = ...) -> tuple[Connection, Connection]: ...