protected void Receive() { if (ProcessHead() && ProcessContent()) { NetworkEventHandler.AddPacket(mPacket); } }
private static void Update() { // 协议 NetworkEventHandler.Update(); TimerTaskQueue.Instance.Tick(); FrameTimerTaskHeap.Instance.Tick(); SequenceManager.Instance.Tick(); }
private static void Destroy() { NetworkClient.Instance.Stop(); NetworkEventHandler.Clear(); SequenceManager.Instance.Clear(); TimerTaskQueue.Instance.Reset(); FrameTimerTaskHeap.Instance.Reset(); IntEventDispatcher.Cleanup(); Logger.Instance.Stop(); }
private static void Initialize() { Properties cfg = Properties.Create("config.txt"); InitializeLogger(cfg); InitializeClient(cfg); TimerTaskQueue.Instance.Reset(); FrameTimerTaskHeap.Instance.Reset(); SequenceManager.Instance.Clear(); IntEventDispatcher.Cleanup(); NetworkEventHandler.Initialize(); }