from typing import Any, Optional

class Connection:
    def close(self) -> None: ...
    def fileno(self) -> int: ...
    def poll(self, timeout: float = ...) -> bool: ...
    def recv(self) -> Any: ...
    def recv_bytes(self, maxlength: Optional[int] = ...) -> bytes: ...
    def recv_bytes_into(self, buf: Any, offset: int = ...) -> int: ...
    def send(self, obj: Any) -> None: ...
    def send_bytes(self,
                   buf: bytes,
                   offset: int = ...,
                   size: Optional[int] = ...) -> None: ...
