public FingerTable(BigInteger targetId, BigInteger maxId, IMessageTransceiver transceiver, ChordInstance theInstance, int maxSize = 20, bool reverse = false) { this.targetId = targetId; this.maxId = maxId; this.maxSize = maxSize; this.transceiver = transceiver; this.theInstance = theInstance; this.reverse = reverse; }
public Node(IMessageTransceiver transceiver, ChordInstance instance) { this.transceiver = transceiver; this.instance = instance; }
public static ChordInstance CreateChordInstance(byte[] id = null, string tag = "", System.Security.Cryptography.HashAlgorithm hashAlgorithm = null, IMessageTransceiver transceiver = null) { if (transceiver == null) transceiver = new SimpleUDP(); if (hashAlgorithm == null) hashAlgorithm = new System.Security.Cryptography.SHA512Managed(); ChordInstance i = new ChordInstance(hashAlgorithm, transceiver, id); i.tag = tag; return i; }