DHTConfig constructor

const DHTConfig({
  1. String protocolId = '/ipfs/kad/1.0.0',
  2. int alpha = 3,
  3. int bucketSize = 20,
  4. int maxProvidersPerKey = 20,
  5. Duration requestTimeout = const Duration(seconds: 30),
  6. int maxRecordsPerQuery = 20,
  7. bool enableProviderRecording = true,
  8. bool enableValueStorage = true,
  9. bool validateProviderRecords = true,
  10. bool reproviderEnabled = true,
  11. Duration reproviderInterval = const Duration(hours: 12),
  12. String reproviderStrategy = 'pinned',
  13. int reproviderBatchSize = 100,
  14. int reproviderConcurrency = 10,
  15. bool reproviderSweepOptimization = true,
})

Creates a new DHTConfig with default Kademlia settings.

Implementation

const DHTConfig({
  this.protocolId = '/ipfs/kad/1.0.0',
  this.alpha = 3,
  this.bucketSize = 20,
  this.maxProvidersPerKey = 20,
  this.requestTimeout = const Duration(seconds: 30),
  this.maxRecordsPerQuery = 20,
  this.enableProviderRecording = true,
  this.enableValueStorage = true,
  this.validateProviderRecords = true,
  this.reproviderEnabled = true,
  this.reproviderInterval = const Duration(hours: 12),
  this.reproviderStrategy = 'pinned',
  this.reproviderBatchSize = 100,
  this.reproviderConcurrency = 10,
  this.reproviderSweepOptimization = true,
});