infinity-bridge-host 0.1.2

Host-side WebSocket server for infinity-bridge — async tokio, no framework dependency
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use infinity_bridge_wire::HelloPayload;
use tokio::sync::mpsc;
use tokio::time::Instant;

pub(crate) struct Client {
    pub tx: mpsc::UnboundedSender<String>,
    pub hello: Option<HelloPayload>,
    pub last_seen: Instant,
    /// Set when the client reports [`infinity_bridge_wire::READY_EVENT`] —
    /// its own downstream link (CommBus → WASM) is bound, so a command sent
    /// here can actually be served. Relays that never send the event stay
    /// `false`, which means "unknown", not "unreachable".
    pub ready: bool,
}