Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Patch: Server end for client data saving
Home

Re: [Freeciv-Dev] Patch: Server end for client data saving

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Patch: Server end for client data saving
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 22 Aug 1999 12:27:19 +0200

Marko Lindqvist <caz@xxxxxxxxxxxxxxxx> writes:

>  With this patch server stores some data for client, saves it with
> savegames and sends back to client when loads savegame. There is no client
> to ask this. I have just created this patch to be used with my client side
> AI.

I like this idea. Has lot of uses.

But I think your implementation is a bit too complicated. I think 1
byte as basic unit is even more manageable than 12 bytes. Also, the
server should notice itself when it has to allocate memory.

I would do it like this:

- a packet PACKET_CLIENT_DATA, which has two strings, the key and the
data, with the only restriction that the sum must not be larger than
the maximal packet size. If, for example, somebody implements
Auto-Elvis in his client, the client could send packets with key
"AUTO-ELVIS Tenochtitlan" as key and "1" as value (or use an internal
id and the city-id to save space). If value is empty, the server
removes the key to save space.

- a packet PACKET_RECALL_CLIENT_DATA, which has one string, the key,
and would the server make send a PACKET_CLIENT_DATA packet.

- on reconnect, the server would send out all packets it has saved. I
can't really think of a use for querying keys, but probably there is
one.

        Falk


[Prev in Thread] Current Thread [Next in Thread]