C# Class PSXDH.DAL.CdnHost

Show file Open project: KOPElan/PSX-Download-Helper Class Usage Examples

Public Methods

Method Description
ExportHost ( ) : bool

导出最终的CDN列表

GetCdnAddress ( string host, bool &isCdn ) : IPAddress

获取cdn地址,没有则返回系统解析地址

Instance ( ) : CdnHost
ReadCdnConfig ( ) : void

读取CDN链接

Private Methods

Method Description
AddToBlur ( string key, string value ) : void
AddToCdnHost ( string key, string value ) : void
AddToHashTable ( string cdnInfo ) : void

将主机地址与对应域名存入hashtable

BuildCdnList ( string cdnInfo, PingReply reply ) : void

将返回ping值结果比对后建立hashtable

PingHost ( string ip, string host ) : PingReply

同步PING远程主机,成功后返回系统和CDN里表中最快的IP地址

ReadCdnConfig ( string path, bool isPing ) : void

读取主机信息

Method Details

ExportHost() public method

导出最终的CDN列表
public ExportHost ( ) : bool
return bool

GetCdnAddress() public method

获取cdn地址,没有则返回系统解析地址
public GetCdnAddress ( string host, bool &isCdn ) : IPAddress
host string
isCdn bool
return System.Net.IPAddress

Instance() public static method

public static Instance ( ) : CdnHost
return CdnHost

ReadCdnConfig() public method

读取CDN链接
public ReadCdnConfig ( ) : void
return void