httpdns singleton

This commit is contained in:
tongchenfei
2021-01-05 14:02:48 +08:00
parent 61c380ff23
commit a121f3d2bd
9 changed files with 91 additions and 10 deletions

View File

@@ -28,7 +28,7 @@ public class WebSocketDnsManager {
public void getHttpDnsIp(WebSocketDns webSocketDns) {
this.webSocketDns = webSocketDns;
IMogoHttpDns mogoHttpDns = ARouter.getInstance().navigation(IMogoHttpDns.class);
IMogoHttpDns mogoHttpDns = MogoHttpDnsHandler.getHttpDnsApi();
ThreadPoolService.execute(() -> mogoHttpDns.getHttpDnsIp(WebSocketConstant.getDomain(), HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_WS,false, ip -> {
Logger.d(TAG, "getHttpDnsIp ip : " + ip + " , 得到Dns IP,准备回调 初始化webSocket");
this.cacheIp = ip;