C# 클래스 Ipop.Dht.DhtDns

This class provides the ability to lookup names using the Dht. To add a name into the Dht either add a Hostname node into your AddressData node inside the IpopConfig or use another method to publish to the Dht. The format of acceptable hostnames is [a-zA-Z0-9-_\.]*.ipop (i.e. must end in .ipop)
상속: Dns
파일 보기 프로젝트 열기: pstjuste/brunet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_dht IDht
_ipop_namespace String
_sync object
dns_a Cache
dns_ptr Cache

공개 메소드들

메소드 설명
AddressLookUp ( String name ) : String

Called during LookUp to perform translation from hostname to IP. If an entry isn't in cache, we can try to get it from the Dht. Throws an exception if the name is invalid and returns null if no name is found.

DhtDns ( MemBlock ip, MemBlock netmask, string name_server, bool forward_queries, IDht dht, String ipop_namespace ) : Brunet

Create a DhtDns using the specified Dht object

NameLookUp ( String IP ) : String

Called during LookUp to perfrom a translation from IP to hostname. Entries get here via the AddressLookUp as the Dht does not retain pointer lookup information.

메소드 상세

AddressLookUp() 공개 메소드

Called during LookUp to perform translation from hostname to IP. If an entry isn't in cache, we can try to get it from the Dht. Throws an exception if the name is invalid and returns null if no name is found.
public AddressLookUp ( String name ) : String
name String The name to lookup
리턴 String

DhtDns() 공개 메소드

Create a DhtDns using the specified Dht object
public DhtDns ( MemBlock ip, MemBlock netmask, string name_server, bool forward_queries, IDht dht, String ipop_namespace ) : Brunet
ip MemBlock
netmask MemBlock
name_server string
forward_queries bool
dht IDht A Dht object used to acquire name translations
ipop_namespace String
리턴 Brunet

NameLookUp() 공개 메소드

Called during LookUp to perfrom a translation from IP to hostname. Entries get here via the AddressLookUp as the Dht does not retain pointer lookup information.
public NameLookUp ( String IP ) : String
IP String The IP to look up.
리턴 String

프로퍼티 상세

_dht 보호되어 있는 프로퍼티

Use this Dht to resolve names that aren't in cache
protected IDht _dht
리턴 IDht

_ipop_namespace 보호되어 있는 프로퍼티

The namespace where the hostnames are being stored.
protected String _ipop_namespace
리턴 String

_sync 보호되어 있는 프로퍼티

protected object _sync
리턴 object

dns_a 보호되어 있는 프로퍼티

Maps names to IP Addresses
protected Cache dns_a
리턴 Cache

dns_ptr 보호되어 있는 프로퍼티

Maps IP Addresses to names
protected Cache dns_ptr
리턴 Cache