Ejemplo n.º 1
0
        /// <summary>
        /// IClieventListener.EventReceive
        /// 처리흐름 : ClientIoHandler -> [IClientEventListener] -> ClientEventAbstract -> IUIEventListener
        /// </summary>
        /// <param name="protocol"></param>
        /// <param name="buffer"></param>
        public void EventReceive(Protocol protocol, IoBuffer buffer)
        {
            Log.game.Debug("controller.EventReceived : " + protocol.Desc);

            //프로토콜에 해당하는 ClientEvent 반환
            ClientEventAbstract clientEvent = ClientEventFactory.getEvent(protocol);

            if (clientEvent == null)
            {
                return;
            }

            try{
                //이벤트 처리
                clientEvent.Set(buffer);
            }catch {
            }finally{
                //UIEventListener에 전달하기 위해 등록
                AddClientEvent(clientEvent);
            }
        }