NetworkConfig constructor

NetworkConfig({
  1. List<String> listenAddresses = defaultListenAddresses,
  2. List<String> bootstrapPeers = defaultBootstrapPeers,
  3. int maxConnections = 50,
  4. Duration connectionTimeout = const Duration(seconds: 30),
  5. bool enableNatTraversal = false,
  6. bool enableMDNS = true,
  7. String? nodeId,
  8. String? delegatedRoutingEndpoint,
})

Creates a network configuration with the given options.

Implementation

NetworkConfig({
  this.listenAddresses = defaultListenAddresses,
  this.bootstrapPeers = defaultBootstrapPeers,
  this.maxConnections = 50,
  this.connectionTimeout = const Duration(seconds: 30),
  this.enableNatTraversal = false,
  this.enableMDNS = true,
  String? nodeId,
  this.delegatedRoutingEndpoint,
}) : nodeId = nodeId ?? _generateDefaultNodeId();