Ejemplo n.º 1
0
        public override bool Init()
        {
            m_Root         = new RootBehaviour <WebServerModule>(this);
            m_OpCodeTypeBv = new OpCodeTypeBv();
            m_Root.AddIBehaviour(m_OpCodeTypeBv);
            m_OpCodeTypeBv.Load(typeof(WebServerModule).Assembly);


            m_Dispather = new WMessageDispather();
            m_Root.AddIBehaviour(m_Dispather);
            m_Dispather.Load(typeof(WebServerModule).Assembly);



            m_WebSocketServer           = new WebSocketServer(GameMainEntry.Instance.SettingModule.ServerSetting.Web_Ip);
            m_WebSocketServer.KeepClean = true;
            {
                m_WebSocketServer.SslConfiguration.ServerCertificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("Setting/www.hengtaiyunyou.com.pfx", "AEQEvO54");
            }
            //m_WebSocketServer.Log.Level = LogLevel.Debug;
            m_WebSocketServer.AddWebSocketService <WebBv>("/");
            m_WebSocketServer.Start();


            Log.Debug("WebSocketServer Start ");
            m_Root.Init();

            return(base.Init());
        }
Ejemplo n.º 2
0
        public override bool Init()
        {
            m_Root         = new RootBehaviour <WebServerModule>(this);
            m_OpCodeTypeBv = new OpCodeTypeBv();
            m_Root.AddIBehaviour(m_OpCodeTypeBv);
            m_OpCodeTypeBv.Load(typeof(WebServerModule).Assembly);


            m_Dispather = new WMessageDispather();
            m_Root.AddIBehaviour(m_Dispather);
            m_Dispather.Load(typeof(WebServerModule).Assembly);



            m_WebSocketServer           = new WebSocketServer(GameMainEntry.Instance.SettingModule.ServerSetting.Web_Ip);
            m_WebSocketServer.KeepClean = true;
            //m_WebSocketServer.Log.Level = LogLevel.Debug;
            m_WebSocketServer.AddWebSocketService <WebBv>("/");
            m_WebSocketServer.Start();


            Log.Debug("WebSocketServer Start ");
            m_Root.Init();

            return(base.Init());
        }
 public override void Validate(ref object value, FieldInfo field, RootBehaviour rootObject)
 {
     if (field.FieldType == typeof(GameObject))
     {
         GameObject x = value as GameObject;
         if (x == null)
         {
             Debug.LogError("<color=blue>[NotNull]</color> " + field.Name + " in " + rootObject.name + " is null");
         }
     }
     else
     {
         Debug.LogWarning("<color=blue>[NotNull]</color> Is only implemented for GameObjects, not for " + field.FieldType.ToString());
     }
 }
Ejemplo n.º 4
0
        public override bool Init()
        {
            bool pret = base.Init();

            m_ServerFrameGenerator = new ServerFrameGenerator();
            m_PlayerRecoder        = new PlayerRecoder();
            m_ABv_Set = new RootBehaviour <ServerPlayer>(this);
            m_ABv_Set.AddIBehaviour(m_ServerFrameGenerator);
            m_ABv_Set.AddIBehaviour(m_PlayerRecoder);

            m_ABv_Set.Init();


            List_ISendCommand.Add(m_ServerFrameGenerator);
            return(pret);
        }
Ejemplo n.º 5
0
 public abstract void Validate(ref object value, FieldInfo field, RootBehaviour rootObject);