添加资源http-dns实现
This commit is contained in:
@@ -27,36 +27,68 @@ interface IMogoHttpDns extends IProvider {
|
||||
@Nullable
|
||||
HttpDns dns();
|
||||
|
||||
// /**
|
||||
// * 获取缓存中的 dns ip地址
|
||||
// *
|
||||
// * @param host
|
||||
// * @return
|
||||
// */
|
||||
// @Nullable
|
||||
// String getCachedHttpDnsIps( String host );
|
||||
|
||||
/**
|
||||
* 获取缓存中的 dns ip地址
|
||||
*
|
||||
* @param host
|
||||
* 获取缓存中的dns ip地址
|
||||
* @param host domain
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
String getCachedHttpDnsIps( String host );
|
||||
String getCachedHttpDnsIps(String host, int type);
|
||||
//
|
||||
// /**
|
||||
// * dns 解析
|
||||
// *
|
||||
// * @param host 域名
|
||||
// * @param useCache 是否使用缓存,是 - 如果没有缓存,则解析新地址、否 - 解析新地址,并将新地址缓存
|
||||
// * @param callback
|
||||
// */
|
||||
// void getHttpDnsIp( String host, boolean useCache, IHttpDnsCallback callback );
|
||||
|
||||
/**
|
||||
* dns 解析
|
||||
*
|
||||
* @param host 域名
|
||||
* @param useCache 是否使用缓存,是 - 如果没有缓存,则解析新地址、否 - 解析新地址,并将新地址缓存
|
||||
* dns解析
|
||||
* @param host
|
||||
* @param type
|
||||
* @param useCache
|
||||
* @param callback
|
||||
*/
|
||||
void getHttpDnsIp( String host, boolean useCache, IHttpDnsCallback callback );
|
||||
void getHttpDnsIp(String host, int type, boolean useCache, IHttpDnsCallback callback);
|
||||
|
||||
// /**
|
||||
// * 监听 ttl 回调
|
||||
// *
|
||||
// * @param host 域名
|
||||
// * @param callback
|
||||
// */
|
||||
// void addHttpDnsTtlCallback( String host, IHttpDnsTtlCallback callback );
|
||||
|
||||
/**
|
||||
* 监听 ttl 回调
|
||||
*
|
||||
* @param host 域名
|
||||
* 监听ttl回调
|
||||
* @param host
|
||||
* @param type
|
||||
* @param callback
|
||||
*/
|
||||
void addHttpDnsTtlCallback( String host, IHttpDnsTtlCallback callback );
|
||||
void addHttpDnsTtlCallback(String host, int type, IHttpDnsTtlCallback callback);
|
||||
|
||||
// /**
|
||||
// * 注销 ttl 回调
|
||||
// *
|
||||
// * @param host 域名
|
||||
// */
|
||||
// void removeHttpDnsTtlCallback( String host );
|
||||
|
||||
/**
|
||||
* 注销 ttl 回调
|
||||
*
|
||||
* @param host 域名
|
||||
* 注销ttl回调
|
||||
* @param host
|
||||
* @param type
|
||||
*/
|
||||
void removeHttpDnsTtlCallback( String host );
|
||||
void removeHttpDnsTtlCallback(String host,int type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user