1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Connection-state events for the streamer.
//!
//! The streamer publishes a `watch::Receiver<ConnectionEvent>` so consumers
//! can observe the lifecycle of a single WebSocket session: connect, login
//! outcome, transient stream errors, and disconnect. The channel is meant
//! for fan-out to other tasks (UI, monitoring); the consumer's own
//! reconnect loop typically also learns about disconnects from `recv()`
//! returning `Err`.
//!
//! `Connected` is the watch channel's initial value: the streamer only
//! exists once the WS handshake has succeeded.
/// Lifecycle event for one streamer WebSocket session, published on the
/// watch channel returned by [`ReadHalf::events`](super::ReadHalf::events).
/// Why a [`ConnectionEvent::Disconnected`] event was emitted.