示例#1
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());
        }
示例#2
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);
            }
        }