INNER CODE UNIT · Python
MESSAGE_FRAME_BEGIN
TheXTech/TheXTech · resources/_dev_scripts/xserver.py:50
MESSAGE_FRAME_BEGIN = 32 # meta-message: the following messages belong to the named frame
MESSAGE_ADD_CLIENT = 33
MESSAGE_DROP_CLIENT = 34
MESSAGE_FRAME_END = 35 # meta-message (TCP only): the previously named frame is now complete
MESSAGE_TRANSMIT_START = 36 # meta-message (UDP only): transmission is only valid if this frame has passed, generally acknowledges receipt of messages up to the named frame
def display_room_key(room_key):
if len(room_key) != 4:
return ''
room_key_int = (room_key[0] << 24) + (room_key[1] << 16) + (room_key[2] << 8) + (room_key[3] << 0)
if (room_key_int & (192 << 24)):
return ''
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ346789'
letters = ''.join([chars[(room_key_int >> off) % 32] for off in (25, 20, 15, 10, 5, 0)])