Property | Type | Description | |
---|---|---|---|
_attempts | int>.Dictionary | ||
_dht | IDht | ||
_incoming_cache | Address>.TimeBasedCache | ||
_ipop_namespace | string | ||
_mapping | MemBlock>.Dictionary | ||
_queued | bool>.Dictionary | ||
_sync | Object | ||
_verified_cache | Address>.TimeBasedCache |
Method | Description | |
---|---|---|
Check ( MemBlock ip, Brunet.Address addr ) : bool |
Is the right person sending me this packet?
|
|
DhtAddressResolver ( IDht dht, string ipop_namespace ) : Brunet |
Creates a DhtAddressResolver Object.
|
|
Resolve ( MemBlock ip ) : Brunet.Address |
Translates an IP Address to a Brunet Address. If it is in the cache it returns a result, otherwise it returns null and begins a Miss lookup.
|
|
Stop ( ) : void |
Stops the timer at which point a new DhtAddressResolver will need to be constructed, if used in the same process.
|
Method | Description | |
---|---|---|
Miss ( MemBlock ip ) : bool |
This is called if the cache's don't have an Address mapping. It prepares an asynchronous Dht query if one doesn't already exist, that is only one query at a time per IP regardless of how many misses occur. The ansychonorous call back is call MissCallback.
|
|
MissCallback ( Object o, |
This is the asynchronous callback for Miss. This contains the lookup results from the Dht. If there is a valid mapping it is added to the cache. Either way, new queries can now be run for the IP address after the completion of this method.
|
public Check ( MemBlock ip, Brunet.Address addr ) : bool | ||
ip | MemBlock | The IP source. |
addr | Brunet.Address | |
return | bool |
public DhtAddressResolver ( IDht dht, string ipop_namespace ) : Brunet | ||
dht | IDht | The dht object to use for dht interactions. |
ipop_namespace | string | The ipop namespace where the dhcp server /// is storing names. |
return | Brunet |
protected Miss ( MemBlock ip ) : bool | ||
ip | MemBlock | The IP Address to look up in the Dht. |
return | bool |
protected MissCallback ( Object o, |
||
o | Object | Contains the Channel where the results are stored. |
args | Null. | |
return | void |
public Resolve ( MemBlock ip ) : Brunet.Address | ||
ip | MemBlock | The IP Address to translate. |
return | Brunet.Address |
protected TimeBasedCache |
||
return | Address>.TimeBasedCache |