Skip to main content

Module net

Module net 

Source
Expand description

Streams over weirdnet-net: a Hub served on a node, and a Subscriber to one stream.

Structs§

AllowAll
Lets everyone subscribe (tests, or a node whose connections are already gated).
Hub
The streams a node offers: live publishers and recorded sources.
Server
Serving a hub. Dropping it stops accepting new subscribers.
Subscriber
One subscription to a stream on another node.

Constants§

PROTOCOL
The stream protocol id.

Traits§

StreamAuth
Decides whether peer may subscribe to stream. A closure works.

Functions§

serve
Serve hub on node at PROTOCOL, asking auth about each subscription. Needs a tokio runtime context.