public RoutingTable() : this(new Node(NodeId.Create(), new System.Net.IPEndPoint(IPAddress.Any, 0))) { }
public Bucket(NodeId min, NodeId max) { this.min = min; this.max = max; }
public void Setup() { manager = new TokenManager(); node = new Node(NodeId.Create(), new IPEndPoint(IPAddress.Parse("127.0.0.1"), 25)); token = manager.GenerateToken(node); }
internal void RaisePeersFound(NodeId infoHash, IList <PeerInfo> peers) { PeersFound?.Invoke(this, new PeersFoundEventArgs(InfoHash.FromMemory(infoHash.AsMemory()), peers)); }
internal void RaisePeersFound(NodeId infoHash, IList <Peer> peers) { PeersFound?.Invoke(this, new PeersFoundEventArgs(new InfoHash(infoHash.Bytes), peers)); }
public Node(NodeId id, IPEndPoint endpoint) { this.endpoint = endpoint; this.id = id; }