Skip to main content

Module network

Module network 

Source

Modules§

behavior
events
protocol
Wire protocol for room discovery and message broadcast.

Structs§

NetworkHandle

Enums§

NetworkCommand
NetworkMode
How the network discovers peers.

Functions§

start_network
start_network_with
Start the network task with explicit mode, TCP listen port, and any pre-configured relay multiaddrs. listen_port = 0 requests a random port. Relays are dialed on startup; once Identify lands from a relay peer, we call listen_on("<relay>/p2p-circuit") to register a reservation so peers behind NAT can dial us through it.