Module wshrpc

Module wshrpc 

Source
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).
RpcResponseHandler
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§

CommandHandlerFn
Callback type for command handlers.