Skip to main content

Crate antenna_client_web

Crate antenna_client_web 

Source
Expand description

WebAssembly platform driver for the antenna P2P mesh protocol.

Wraps antenna-protocol’s MeshNodeFSM and bridges it to the browser’s RTCPeerConnection, RTCDataChannel, and WebSocket via web-sys.

Structs§

Peer
User-facing handle to a mesh peer running in the browser.
SignalingClient
Browser-side client for the bundled antenna signaling server.
Storage
Identity persistence backed by window.localStorage.

Functions§

js_message
Wrap a JS function (peerId: string, msg: object) into a MessageCallback for Event::UserMessage. msg is serialized to a plain JS object via serde-wasm-bindgen.
js_no_arg
Wrap a JS function (zero arguments) into a NoArgCallback for Peer::subscribe(Event::Connected(...)) and similar.
js_peer
Wrap a JS function (peerId: string) into a PeerCallback for Event::PeerConnected and similar peer-scoped events.