Expand description
WshRpc — main RPC client with message routing and response handling.
Port of Go’s pkg/wshutil/wshrpc.go.
Provides the core RPC communication layer:
- Message send/receive via channels
- Request/response correlation via request IDs
- Streaming responses (continued flag)
- Context cancellation propagation
- Auth token injection
Structs§
- RpcData 🔒
- Pending RPC request state.
- RpcResponse
- RPC response data (single response or stream item).
- RpcResponse
Handler - Handler for incoming RPC requests (server side).
- WshRpc
- Main WshRpc client.
Constants§
- DEFAULT_
TIMEOUT_ MS - Default timeout for RPC calls in milliseconds.
- RESP_
CH_ SIZE - Channel buffer size for response channels.
Type Aliases§
- Command
Handler Fn - Callback type for command handlers.