public override bool Init() { Log.Debug("SiloNetWork Init"); var gameconfig = GameModuleManager.Instance.GetModule <ConfigManager>().GameConfig; m_ServerNetWork = new ServerNetWork(NetworkProtocol.TCP, gameconfig.NetWorkIp); m_ServerNetWork.MessagePacker = new Protobuf3Packer(); var opCodeTypeBv = new OpCodeTypeBv(); m_ServerNetWork.IOpCodeType = opCodeTypeBv; m_ServerNetWork.AddIBehaviour(opCodeTypeBv); var messageDispatherBv = new RpcMessageDispatherBv(); m_ServerNetWork.AddIBehaviour(messageDispatherBv); m_ServerNetWork.IMessageDispatcher = messageDispatherBv; m_ServerNetWork.Init(); //opCodeTypeBv.Load(GetType().Assembly); opCodeTypeBv.Load(typeof(IHall.IHello).Assembly); messageDispatherBv.Load(GetType().Assembly); return(base.Init()); }
public override bool Init() { Log.Debug("SiloNetWork Init"); m_ServerNetWork = new ServerNetWork(NetworkProtocol.TCP, "127.0.0.1:2010"); 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); opCodeTypeBv.Load(typeof(IHall.IHello).Assembly); messageDispatherBv.Load(GetType().Assembly); return(base.Init()); }