hub_core library
The hub's logic, without a server: for hosting a room from a browser.
Web-safe, unlike package:peer_coordinator/hub.dart. Hand HubCore a
HubLink per peer — a WebRTC data channel, or HubLink.pair for the
hosting page's own node — and point each peer's WebSocketTransportConfig
at its end of the link with connector. The security model is the same as
the server hub's: everyone holding the secret is in one trust domain.
Classes
- HubCloseCode
- WebSocket close codes the hub uses to say why it hung up.
- HubCore
- A role-blind relay.
- HubCredentials
- The shared secret for one hub session.
- HubLink
- A message-oriented, ordered, reliable link carrying text and binary frames.
- WebSocketHubLink
-
A HubLink over a
package:web_socket_channelsocket. - WsLimits
- What a hub will accept before it stops being polite.
Enums
- HubSessionStatus
- Whether a hub is currently admitting peers.
Typedefs
-
HubConnector
= Future<
HubLink> Function() -
Opens a link to a hub. Used in place of dialling
hubUriwhen given.