internal LocalObjectStorage(Config config, Node node) { this.config = config; this.node = node; Directory.CreateDirectory(config.StoreDirectory); foreach (var file in Directory.GetFiles(config.StoreDirectory)) { // TODO: verify file names and contents? currentObjects[KademliaId.FromHex(Path.GetFileName(file))] = DateTime.Now; } KyruTimer.Register(this, 60); }
internal KyruApplication(ushort port) { Config = new Config(); Node = new Node(port, this); LocalObjectStorage = new LocalObjectStorage(Config, Node); }