public Register ( MemBlock key, MemBlock value, int ttl ) : bool | ||
key | MemBlock | dht entry key to insert |
value | MemBlock | dht entry value to insert |
ttl | int | dht entry ttl to insert |
Résultat | bool |
/// <summary>Uses the Dht for the bootstrap problem.</summary> /// <param name="node">The node needing remote tas.</param> /// <param name="dht">The dht for the shared overlay.</param> /// <param name="dht_proxy">A dht proxy for the shared overlay.</param> 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); }
/// <summary>Uses the Dht for the bootstrap problem.</summary> /// <param name="node">The node needing remote tas.</param> /// <param name="dht">The dht for the shared overlay.</param> /// <param name="dht_proxy">A dht proxy for the shared overlay.</param> 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); }