import websockets
from typing import Any, Optional
from uvicorn.protocols.utils import get_local_addr as get_local_addr, get_remote_addr as get_remote_addr, is_ssl as is_ssl

class Server:
    closing: bool = ...
    def register(self, ws: Any) -> None: ...
    def unregister(self, ws: Any) -> None: ...
    def is_serving(self): ...

class WebSocketProtocol(websockets.WebSocketServerProtocol):
    config: Any = ...
    app: Any = ...
    loop: Any = ...
    logger: Any = ...
    root_path: Any = ...
    connections: Any = ...
    tasks: Any = ...
    transport: Any = ...
    server: Any = ...
    client: Any = ...
    scheme: Any = ...
    scope: Any = ...
    handshake_started_event: Any = ...
    handshake_completed_event: Any = ...
    closed_event: Any = ...
    initial_response: Any = ...
    connect_sent: bool = ...
    accepted_subprotocol: Any = ...
    transfer_data_task: Any = ...
    ws_server: Any = ...
    def __init__(self, config: Any, server_state: Any, _loop: Optional[Any] = ...) -> None: ...
    def connection_made(self, transport: Any) -> None: ...
    def connection_lost(self, exc: Any) -> None: ...
    def shutdown(self) -> None: ...
    def on_task_complete(self, task: Any) -> None: ...
    async def process_request(self, path: Any, headers: Any): ...
    def process_subprotocol(self, headers: Any, available_subprotocols: Any): ...
    def send_500_response(self) -> None: ...
    async def ws_handler(self, protocol: Any, path: Any) -> None: ...
    async def run_asgi(self) -> None: ...
    async def asgi_send(self, message: Any) -> None: ...
    async def asgi_receive(self): ...
