C# Class SIPSorcery.Net.DNSManager

Afficher le fichier Open project: sipsorcery/sipsorcery

Méthodes publiques

Méthode Description
Lookup ( string hostname, DNSQType queryType, int timeout, List dnsServers ) : Heijden.DNS.DNSResponse

This method will wait until either the lookup completes or the timeout is reached before returning.

Lookup ( string hostname, DNSQType queryType, int timeout, List dnsServers, bool useCache, bool async ) : Heijden.DNS.DNSResponse
LookupAsync ( string hostname ) : Heijden.DNS.DNSResponse

Does a lookup on the DNSManager's currently cached entries. If not found it returns null indicating no information is currently available on the host while at the same time queueing a lookup for the DNSManager to do a lookup. Once the lookup has been completed the entry will be stored in cache and available for subsequent lookup requests. This approach to lookups is very useful for some SIP request situations. SIP has a built in retransmit mechanism so rather than hold up the processing of a SIP request while a DNS lookup is done the request can be ignored and in the time it takes for the SIP request retransmit the lookup can be done.

LookupAsync ( string hostname, DNSQType queryType ) : Heijden.DNS.DNSResponse
SetDNSServers ( List dnsServers ) : void
Stop ( ) : void

Private Methods

Méthode Description
DNSManager ( ) : System
MatchIPAddress ( string hostname ) : Heijden.DNS.DNSResponse
ProcessLookups ( ) : void
QueueLookup ( LookupRequest lookupRequest ) : void

Method Details

Lookup() public static méthode

This method will wait until either the lookup completes or the timeout is reached before returning.
public static Lookup ( string hostname, DNSQType queryType, int timeout, List dnsServers ) : Heijden.DNS.DNSResponse
hostname string The hostname of the A record to lookup in DNS.
queryType DNSQType
timeout int Timeout in seconds for the lookup.
dnsServers List
Résultat Heijden.DNS.DNSResponse

Lookup() public static méthode

public static Lookup ( string hostname, DNSQType queryType, int timeout, List dnsServers, bool useCache, bool async ) : Heijden.DNS.DNSResponse
hostname string
queryType DNSQType
timeout int
dnsServers List
useCache bool
async bool
Résultat Heijden.DNS.DNSResponse

LookupAsync() public static méthode

Does a lookup on the DNSManager's currently cached entries. If not found it returns null indicating no information is currently available on the host while at the same time queueing a lookup for the DNSManager to do a lookup. Once the lookup has been completed the entry will be stored in cache and available for subsequent lookup requests. This approach to lookups is very useful for some SIP request situations. SIP has a built in retransmit mechanism so rather than hold up the processing of a SIP request while a DNS lookup is done the request can be ignored and in the time it takes for the SIP request retransmit the lookup can be done.
public static LookupAsync ( string hostname ) : Heijden.DNS.DNSResponse
hostname string The hostname of the A record to lookup in DNS.
Résultat Heijden.DNS.DNSResponse

LookupAsync() public static méthode

public static LookupAsync ( string hostname, DNSQType queryType ) : Heijden.DNS.DNSResponse
hostname string
queryType DNSQType
Résultat Heijden.DNS.DNSResponse

SetDNSServers() public static méthode

public static SetDNSServers ( List dnsServers ) : void
dnsServers List
Résultat void

Stop() public static méthode

public static Stop ( ) : void
Résultat void