def METHOD_NAME(sck):
    realmlist_bytes = pack('<B', len(REALMLIST))
    for realm in REALMLIST.values():
        is_realm_local = config.Server.Connection.Realm.local_realm_id == realm.realm_id
        name_bytes = PacketWriter.string_to_bytes(realm.realm_name)
        # Only check if the forward address needs to be overriden if this realm is hosted on this same machine.
        # Docker on Windows hackfix.
        # https://discord.com/channels/628574828038717470/653374433636909077/840314080073351238
        if is_realm_local:
            forward_address = os.getenv(EnvVars.EnvironmentalVariables.FORWARD_ADDRESS_OVERRIDE,
                                        realm.proxy_address)
        else:
            forward_address = realm.proxy_address
        address_bytes = PacketWriter.string_to_bytes(f'{forward_address}:{realm.proxy_port}')
        online_count = RealmDatabaseManager.realmlist_get_online_player_count(realm.realm_id)
        realmlist_bytes += pack(
            f'<{len(name_bytes)}s{len(address_bytes)}sI',
            name_bytes,
            address_bytes,
            online_count
        )
    Logger.debug(f'[{sck.getpeername()[0]}] Sending realmlist...')
    sck.sendall(realmlist_bytes)