async def METHOD_NAME(socket: WebSocket) -> None:
    await socket.accept()
    send, recv = _make_send_recv_callbacks(socket)
    pathname = "/" + socket.scope["path_params"].get("path", "")
    pathname = pathname[len(options.url_prefix) :] or "/"
    search = socket.scope["query_string"].decode()
    try:
        await serve_layout(
            Layout(
                ConnectionContext(
                    component(),
                    value=Connection(
                        scope=socket.scope,
                        location=Location(pathname, f"?{search}" if search else ""),
                        carrier=socket,
                    ),
                )
            ),
            send,
            recv,
        )
    except WebSocketDisconnect as error:
        logger.info(f"WebSocket disconnect: {error.code}")