/** * Downloads the last object processed on the quick stereo server */ public void LoadFromServer() { GameObject obj = (GameObject)Instantiate(Resources.Load("Prefabs/DownloadServer")); _downloadServer = obj.GetComponent <DownloadServer>(); _downloadServer.ResetSuccess(); _downloadServer.Download("model"); _download = true; }
public IEnumerator GetStreamKeyStreamServer(Action <string> callback, string songId) { JSONObject parameters = new JSONObject(); parameters.AddField("songID", songId); parameters.AddField("country", _Country.ToJSON()); yield return(StartCoroutine(MakeCall("getStreamKeyStreamServer", parameters, true))); Debug.Log("GetStreamKeyStreamServer done"); Dictionary <string, object> dico = new Dictionary <string, object>(); AccessData(_RootLastRequest, ref dico); _DownloadServer = new DownloadServer(); _DownloadServer.StreamKey = (string)dico["StreamKey"]; _DownloadServer.URL = (string)dico["url"]; _DownloadServer.URL = _DownloadServer.URL.Replace(@"\", ""); _DownloadServer.StreamServerID = (float)dico["StreamServerID"]; _DownloadServer.USecs = (float)dico["uSecs"]; Debug.Log(_DownloadServer.URL); callback.Invoke(_DownloadServer.URL); }
static void Main(string[] args) { AppDomain.MonitoringIsEnabled = true; logger.Info("Loading settings."); config.Load("./Settings.config"); dynamic result; if (Sheriffy.Check(config.Key, out result)) { logger.Info("Subscription name : {0} ", result["subscription"]["name"]); logger.Info("Subscription key : {0} ", result["subscription"]["key"]); logger.Info("Subscription remaining : {0} days", result["subscription"]["remaining"]["days"]); logger.Info("Subscription end date : {0} ", result["subscription"]["remaining"]["date"]); } else { logger.Info("Your subscription has expired or not found please contact to your provider."); Environment.Exit(100); } logger.Info("Loading librarys."); manager.LoadLibrarys(); logger.Info("Loading plugins."); manager.Load(); logger.Info("({0}) Plugin successfully loaded.", manager.Plugins.Count); logger.Info("Services are being loaded and starting."); foreach (Server module in config.Servers) { if (module.Class == typeof(GatewayServer).FullName) { GatewayServer server = new GatewayServer(); server.Bind = module.Bind; server.ID = module.ID; server.Class = module.Class; server.Description = module.Description; server.Divisions = module.Divisions; server.Server = module.Reditected; server.Start(); services.Add(server); } else if (module.Class == typeof(AgentServer).FullName) { AgentServer server = new AgentServer(); server.Bind = module.Bind; server.ID = module.ID; server.Class = module.Class; server.Description = module.Description; server.Start(); services.Add(server); } else if (module.Class == typeof(DownloadServer).FullName) { DownloadServer server = new DownloadServer(); server.Bind = module.Bind; server.ID = module.ID; server.Class = module.Class; server.Description = module.Description; server.Start(); services.Add(server); } else if (module.Class == typeof(ApiServer).FullName) { ApiServer server = new ApiServer(); server.Bind = module.Bind; server.ID = module.ID; server.Class = module.Class; server.Description = module.Description; server.OnRequestReceived += ApiServer_OnRequestReceived; server.Start(); services.Add(server); } } logger.Info("Everything is looking fine."); SetupConsole(); }
public static void Main(string[] args) { DownloadServer download = new DownloadServer(); }