Expand description

Logic for associating a subscription-style controller object with a WebSocket stream. A module providing low-level building blocks for controlling a WebSocket stream with an embedded control channel through an external subscription object.

Structs

Enums

Traits

  • A trait allowing our stream and subscription infrastructure to work with messages.

Functions

  • Helper function to drive a Subscription related future to completion. The function makes sure to poll the provided stream, which is assumed to be associated with the Subscription that the future belongs to, so that control messages can be received. Errors reported by the stream (identified via Message::is_error) short circuit and fail the operation immediately.
  • Wrap a stream and an associated control channel into a connected (MessageStream, Subscription) pair, in which the subscription can be used to send and receive control messages over the stream.