Module network

Module network 

Source
Expand description

Network, the handle type you use to send messages.

Network is returned from engine::start. It keeps the thread operating the peer alive–the peer stops working when it is dropped.

To send a message using Network, call its sender method to get a sender, then call .send() on the sender passing in a SendCommand.

Structs§

Network
Network is the handle returned by crate::engine::start. It provides Inter-process messaging between application and p2p network.

Enums§

SendCommand
A command to send a message either to a specific peer (SendTo), or to all subscribers of a network topic (Broadcast).