internal bool TryClearJoinRoomDataIfRoom(string room, out JoinRoomData joinRoomData)
    {
        bool result = false;

        joinRoomData = default(JoinRoomData);
        lock (joinRoomDataLock)
        {
            if (signedJoinRoomData != null && RoomIdentifier.EqualsIgnoreInstanceId(signedJoinRoomData.Data.room, room))
            {
                result             = true;
                joinRoomData       = signedJoinRoomData.Data;
                signedJoinRoomData = null;
            }
        }
        return(result);
    }
Exemplo n.º 2
0
        private void onRoomJoin(BaseEvent evt)
        {
            Room room = (Room)evt.Params["room"];

            if (RoomIdentifier.EqualsIgnoreInstanceId(room.Name, mt.JoinRoomDataRoom))
            {
                mt.ClientRoomName = mt.JoinRoomDataRoom;
                if (SmartFoxGameServerClient.EnableUDP)
                {
                    mt.initUDP();
                }
                else
                {
                    fetchServerTimestamp(fetchEncryptionKeyAfterwards: true);
                }
            }
        }