Skip to main content

Module handler

Module handler 

Source
Expand description

Inner I/O feed handler for the Derive WebSocket transport.

The handler owns the [WebSocketClient] exclusively and runs in a dedicated Tokio task. The outer super::client::DeriveWebSocketClient talks to it via a command channel and consumes a stream of DeriveWsMessage events.

Each outbound JSON-RPC request is registered in a pending map keyed by the correlator id. When the venue echoes the id on a response frame, the matching oneshot is fulfilled with result or the JSON-RPC error.

Enumsยง

DeriveWsMessage
Events emitted by the handler for the outer client and downstream consumers.