C# Class LumiSoft.Net.Dns.Client.DnsCache

This class implements dns query cache.
Show file Open project: jeske/StepsDB-alpha Class Usage Examples

Public Methods

Method Description
AddToCache ( string qname, int qtype, DnsServerResponse answers ) : void

Adds dns records to cache. If old entry exists, it is replaced.

ClearCache ( ) : void

Clears DNS cache.

DeSerializeCache ( byte cacheData ) : void

DeSerializes stored cache.

GetFromCache ( string qname, int qtype ) : DnsServerResponse

Tries to get dns records from cache, if any.

SerializeCache ( ) : byte[]

Serializes current cache.

Private Methods

Method Description
DnsCache ( ) : System

Default constructor.

Method Details

AddToCache() public static method

Adds dns records to cache. If old entry exists, it is replaced.
public static AddToCache ( string qname, int qtype, DnsServerResponse answers ) : void
qname string
qtype int
answers DnsServerResponse
return void

ClearCache() public static method

Clears DNS cache.
public static ClearCache ( ) : void
return void

DeSerializeCache() public static method

DeSerializes stored cache.
public static DeSerializeCache ( byte cacheData ) : void
cacheData byte This value must be DnsCache.SerializeCache() method value.
return void

GetFromCache() public static method

Tries to get dns records from cache, if any.
public static GetFromCache ( string qname, int qtype ) : DnsServerResponse
qname string
qtype int
return DnsServerResponse

SerializeCache() public static method

Serializes current cache.
public static SerializeCache ( ) : byte[]
return byte[]