예제 #1
0
        public override bool Init()
        {
            Log.Debug("WebNetWorkModule Init");

            m_ServerNetWork = new ServerNetWork(NetworkProtocol.WebSocket, @"http://127.0.0.1:2000/");

            m_ServerNetWork.Init();



            return(base.Init());
        }
예제 #2
0
        public override bool Init()
        {
            Log.Debug("NetWorkModule init");
            m_ServerNetWork = new ServerNetWork(NetworkProtocol.TCP, "127.0.0.1:2000");
            m_ServerNetWork.MessagePacker = new Protobuf3Packer();


            var opCodeTypeBv = new OpCodeTypeBv();

            m_ServerNetWork.AddIBehaviour(opCodeTypeBv);

            var messageDispatherBv = new MessageDispatherBv();

            m_ServerNetWork.AddIBehaviour(messageDispatherBv);

            m_ServerNetWork.Init();

            opCodeTypeBv.Load(GetType().Assembly);
            messageDispatherBv.Load(GetType().Assembly);
            return(base.Init());
        }