Module sc_network::service

source ·
Expand description

Main entry point of the sc-network crate.

There are two main structs in this module: NetworkWorker and NetworkService. The NetworkWorker is the network. Network is driven by NetworkWorker::run future that terminates only when all instances of the control handles NetworkService were dropped. The NetworkService is merely a shared version of the NetworkWorker. You can obtain an Arc<NetworkService> by calling NetworkWorker::service.

The methods of the NetworkService are implemented by sending a message over a channel, which is then processed by NetworkWorker::next_action.

Re-exports§

Modules§

Structs§

Enums§

  • Possible failures occurring in the context of receiving an inbound request and sending a response.
  • Identity keypair of a node.
  • Possible failures occurring in the context of sending an outbound request and receiving the response.
  • The public key of a node’s identity keypair.