You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 line
883 B

  1. require("preload.Plugin")
  2. function initPluginHttpDns()
  3. print("initPluginHttpDns()")
  4. local PluginConfig = require("preload.PluginConfig")
  5. local targetPlatform = cc.Application:getInstance():getTargetPlatform();
  6. if targetPlatform == 3 then
  7. PluginHttpDns = cc.PluginManager:getInstance():createPlugin("PluginHttpDns" , "com/ddgame/plugin/PluginHttpDns");
  8. elseif targetPlatform == 4 or targetPlatform == 5 then
  9. PluginHttpDns = cc.PluginManager:getInstance():createPlugin("PluginHttpDns" , "PluginHttpDns");
  10. end
  11. if PluginHttpDns then
  12. local pluginParams =
  13. {
  14. appId = PluginConfig.HttpDns.appId,
  15. appKey = PluginConfig.HttpDns.appKey,
  16. urlPreload = PluginConfig.HttpDns.urlPreload,
  17. urlDegrade = "",
  18. useHttps = false,
  19. logEnabled = true,
  20. timeoutInterval = 5000,
  21. chacheEnabled = true,
  22. }
  23. PluginHttpDns:callVoid("initPlugin" , pluginParams);
  24. end
  25. end