Brunet.Services.Dht.DhtDiscovery.DhtDiscovery C# (CSharp) Method

DhtDiscovery() public method

Uses the Dht for the bootstrap problem.
public DhtDiscovery ( StructuredNode node, IDht dht, string shared_namespace, RpcDhtProxy dht_proxy ) : Brunet.Connections
node Brunet.Symphony.StructuredNode The node needing remote tas.
dht IDht The dht for the shared overlay.
shared_namespace string
dht_proxy RpcDhtProxy A dht proxy for the shared overlay.
return Brunet.Connections
    public DhtDiscovery(StructuredNode node, IDht dht, string shared_namespace,
        RpcDhtProxy dht_proxy) :
      base(node)
    {
      _dht = dht;
      _dht_proxy = dht_proxy;
      _node = node;
      _shared_namespace = shared_namespace;
      string skey = "PrivateOverlay:" + node.Realm;
      byte[] bkey = Encoding.UTF8.GetBytes(skey);
      _p2p_address = node.Address.ToMemBlock();
      _private_dht_key = MemBlock.Reference(bkey);

      _ongoing = 0;
      _steady_state = 0;
      _dht_proxy.Register(_private_dht_key, _p2p_address, PUT_DELAY_S);
    }