Expand description
RPC engine: handles incoming RPC requests, dispatches to handlers, and manages request/response lifecycle with timeouts and streaming. Port of Go’s pkg/wshutil/wshrpc.go (WshRpc struct + handler dispatch).
Structs§
- Engine
Inner 🔒 - RpcRequest
Handler - Tracks an outgoing request and collects responses.
Matches Go’s
RpcRequestHandler. - RpcResponse
Handler - Allows an RPC handler to send responses back to the caller.
Matches Go’s
RpcResponseHandler. - WshRpc
Engine - Core RPC engine: handles incoming RPC requests, dispatches to registered command handlers, and manages request/response lifecycle.
Enums§
- Handler 🔒
Constants§
Type Aliases§
- Command
Handler - A boxed async handler function. Takes the command data and returns either:
- Handler
Result - Result type for RPC handler responses.
- Stream
Handler - A streaming handler that returns a channel of responses.