Ejemplo n.º 1
0
        public void Awake()
        {
            StartConfig startConfig = Game.Scene.GetComponent <StartConfigComponent>().StartConfig;

            this.appType    = startConfig.AppType;
            this.HttpConfig = startConfig.GetComponent <HttpConfig>();

            this.Load();

            try
            {
                this.listener = new HttpListener();

                if (this.HttpConfig.Url == null)
                {
                    this.HttpConfig.Url = "";
                }
                foreach (string s in this.HttpConfig.Url.Split(';'))
                {
                    if (s.Trim() == "")
                    {
                        continue;
                    }
                    this.listener.Prefixes.Add(s);
                }

                this.listener.Start();

                this.Accept();
            }
            catch (HttpListenerException e)
            {
                throw new Exception($"http server error: {e.ErrorCode}", e);
            }
        }
Ejemplo n.º 2
0
        public void Awake()
        {
            StartConfigComponent startConfigComponent = Game.Scene.GetComponent <StartConfigComponent>();

            this.AppId = startConfigComponent.StartConfig.AppId;

            StartConfig startConfig = startConfigComponent.LocationConfig;

            this.LocationAddress = startConfig.GetComponent <InnerConfig>().IPEndPoint;
        }
Ejemplo n.º 3
0
        public void Awake()
        {
            StartConfig dbStartConfig = Game.Scene.GetComponent <StartConfigComponent>().DBConfig;

            dbAddress = dbStartConfig.GetComponent <InnerConfig>().IPEndPoint;
        }