Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] [PATCH] Attribute block management
Home

[Freeciv-Dev] [PATCH] Attribute block management

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [PATCH] Attribute block management
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Jan 2001 17:02:06 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxxxx

The attached patch implements the network and server part of the
proposed attribute design. Each player in the client and server can
have an attribute block (void * and length) attached. Such an
attribute block has no hard limit. In the patch however the size is
limited to 64k.

Since packets can have arbitrary length up to a maximum of 4k the
attribute block have to be split into parts (called attribute chunks)
for the transfer. The splitting and assembling is done by high level
methods (send_attribute_block() and generic_handle_attribute_chunk())
so there is no need to touch such a chunk.

The client can send a request for its attribute block. The server
responds with a set (can also be empty) of attribute chunks. They will
get assembled at the client in its player struct.

The client may send its attribute block for example each turn.

The server saves the block of each player it the savegame.

The patch works but currently there is no user. Code is missing which
maps relations like (object-type, object-id, subkey) -> (value) into a
bytestream (the attribute block) and back.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "With a PC, I always felt limited by the software available.
   On Unix, I am limited by my knowledge."
    -- Peter J. Schoenster <pschon@xxxxxxxxxxxxxxxxx>

Attachment: attribute_block.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [PATCH] Attribute block management, Raimar Falke <=