private void SendJoinRoom(AudioRoomEx roomEx)
 {
     var message = new VoipMessageJoinRoom
     {
         RoomName = roomEx.R.AudioRoomId,
         FromUserId = _userData.User.Id
     };
     _audioChatClient.Send(message);
     AddJoinRoomTimeout(roomEx);
 }
 private static IVoipMessage Instantiate(byte mType)
 {
     IVoipMessage m;
     switch (mType)
     {
         case (VoipMessageVoice.MType):
             m = new VoipMessageVoice();
             break;
         case (VoipMessageJoinRoom.MType):
             m = new VoipMessageJoinRoom();
             break;
         case (VoipMessageLeaveRoom.MType):
             m = new VoipMessageLeaveRoom();
             break;
         default:
             m = null;
             break;
     }
     return m;
 }
        private void ReceivedJoin(VoipMessageJoinRoom message)
        {
            AudioRoomEx roomEx;
            lock (_joinedRooms)
            {
                if (!_joinedRooms.TryGetValue(message.RoomName, out roomEx))
                    return;
            }

            OnVoiceConnectionChanged(roomEx, message.IsSuccess);
            RemoveJoinRoomTimeout(message.RoomName);
        }