Skip to content

RpcTask

🛈 DocStrings

An incoming request or notification waiting to be handled.

Attributes:

Name Type Description
kind RpcTaskKind

Whether the message is a request or a notification.

message dict[str, Any]

The raw JSON-RPC message.

done Future[None] | None

Resolved once the message has been handled. Set for notifications, so the connection can wait for notifications received before a given response.

Source code in src/aclientp/task/__init__.py
@dataclass(slots=True)
class RpcTask:
    """An incoming request or notification waiting to be handled.

    Attributes:
        kind: Whether the message is a request or a notification.
        message: The raw JSON-RPC message.
        done: Resolved once the message has been handled. Set for notifications, so the
            connection can wait for notifications received before a given response.
    """

    kind: RpcTaskKind
    message: dict[str, Any]
    done: asyncio.Future[None] | None = None

:fa-brands-github: Show source on GitHub