Module network

Module network 

Source
Expand description

This module contains the networking layer of the application.

It is responsible for creating and managing the libp2p Swarm, and for handling all network events and commands.

Re-exportsยง

pub use behaviour::P2PBehaviourEvent;
pub use handle::NetworkHandle;
pub use layer::NetworkLayer;
pub use message::NetworkCommand;
pub use message::NetworkResponse;

Modulesยง

behaviour ๐Ÿ”’
This module defines the composite NetworkBehaviour for the application.
commands ๐Ÿ”’
This module contains the handlers for NetworkCommands.
handle ๐Ÿ”’
This module defines the NetworkHandle, which is the main API for interacting with the NetworkLayer from other parts of the application.
handlers ๐Ÿ”’
This module contains the event handlers for the various network behaviours.
layer ๐Ÿ”’
This module defines the NetworkLayer, which is the main entry point for interacting with the network.
message ๐Ÿ”’
This module defines the messages that are sent to and from the NetworkLayer.