Ejemplo n.º 1
0
        internal void HandleReconnectUser(Msg_LR_ReconnectUser urMsg, PBChannel channel, int handle, uint seq)
        {
            Msg_RL_ReplyReconnectUser.ReconnectResultEnum result;
            User us = GetUserByGuid(urMsg.UserGuid);

            if (null != us)
            {
                if ((int)UserControlState.UserDropped == us.UserControlState || !us.IsConnected())
                {
                    result = Msg_RL_ReplyReconnectUser.ReconnectResultEnum.Drop;
                }
                else
                {
                    result = Msg_RL_ReplyReconnectUser.ReconnectResultEnum.Online;
                }
            }
            else
            {
                result = Msg_RL_ReplyReconnectUser.ReconnectResultEnum.NotExist;
            }
            Msg_RL_ReplyReconnectUser replyBuilder = new Msg_RL_ReplyReconnectUser();

            replyBuilder.UserGuid = urMsg.UserGuid;
            replyBuilder.RoomID   = urMsg.RoomID;
            replyBuilder.Result   = (int)result;
            channel.Send(replyBuilder);
        }
Ejemplo n.º 2
0
        private void HandleReconnectUser(Msg_LR_ReconnectUser urMsg, PBChannel channel, int handle, uint seq)
        {
            bool isFieldThread;
            int  ix = GetActiveRoomThreadIndex(urMsg.RoomID, out isFieldThread);

            if (ix < 0)
            {
                Msg_RL_ReplyReconnectUser replyBuilder = new Msg_RL_ReplyReconnectUser();
                replyBuilder.UserGuid = urMsg.UserGuid;
                replyBuilder.RoomID   = urMsg.RoomID;
                replyBuilder.Result   = (int)Msg_RL_ReplyReconnectUser.ReconnectResultEnum.NotExist;
                channel.Send(replyBuilder);
            }
            else
            {
                if (isFieldThread)
                {
                    RoomThread roomThread = field_roomthread_list_[ix];
                    roomThread.QueueAction(roomThread.HandleReconnectUser, urMsg, channel, handle, seq);
                }
                else
                {
                    RoomThread roomThread = roomthread_list_[ix];
                    roomThread.QueueAction(roomThread.HandleReconnectUser, urMsg, channel, handle, seq);
                }
            }
        }
Ejemplo n.º 3
0
        internal void HandleReconnectUser(Msg_LR_ReconnectUser urMsg, PBChannel channel, int handle, uint seq)
        {
            bool ret = false;

            if (IsContainDroppedUser(urMsg.UserGuid))
            {
                ret = true;
            }
            Msg_RL_ReplyReconnectUser.Builder replyBuilder = Msg_RL_ReplyReconnectUser.CreateBuilder();
            replyBuilder.SetUserGuid(urMsg.UserGuid);
            replyBuilder.SetRoomID(urMsg.RoomID);
            replyBuilder.SetIsSuccess(ret);
            channel.Send(replyBuilder.Build());
        }
Ejemplo n.º 4
0
        private void HandleReconnectUser(Msg_LR_ReconnectUser urMsg, PBChannel channel, int handle, uint seq)
        {
            int ix = GetActiveRoomThreadIndex(urMsg.RoomID);

            if (ix < 0)
            {
                Msg_RL_ReplyReconnectUser.Builder replyBuilder = Msg_RL_ReplyReconnectUser.CreateBuilder();
                replyBuilder.SetUserGuid(urMsg.UserGuid);
                replyBuilder.SetRoomID(urMsg.RoomID);
                replyBuilder.SetIsSuccess(false);
                channel.Send(replyBuilder.Build());
            }
            else
            {
                RoomThread roomThread = roomthread_list_[ix];
                roomThread.QueueAction(roomThread.HandleReconnectUser, urMsg, channel, handle, seq);
            }
        }
 private void HandelReplyReconnectUser(Msg_RL_ReplyReconnectUser replyMsg, PBChannel channel, int src, uint session)
 {
     //响应RoomServer消息
     m_RoomProcessThread.OnReplyReconnectUser(replyMsg.UserGuid, replyMsg.RoomId, replyMsg.Result);
 }
 private void HandelReplyReconnectUser(Msg_RL_ReplyReconnectUser replyMsg, PBChannel channel, int src, uint session)
 {
     //响应RoomServer消息
     m_RoomProcessThread.QueueAction(m_RoomProcessThread.OnReplyReconnectUser, replyMsg.UserGuid, replyMsg.RoomID, replyMsg.IsSuccess);
 }