Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1998:
[Freeciv-Dev] per-connection capabilities patch
Home

[Freeciv-Dev] per-connection capabilities patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] per-connection capabilities patch
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 31 Oct 1998 20:42:06 +1100

This patch implements per-connection capabilities; the modified
comments in shared.h read:

 * Here's the string a client and server trade to find out if they can talk
 * to each other, and using which protocol version.  The string is a comma-
 * separated list of words, where each word indicates a capability that
 * this version of Freeciv understands.  If a capability word is mandatory,
 * it should start with a "+".
 *
 * eg, #define CAPABILITY "+1.6, MapScroll, +AutoSettlers"
 *
 * (Following para replaces previous c_capability and s_capability. --dwp)
 * There is a string our_capability, which gives the capabilities of
 * the running executable, be it client or server.
 * Each "struct connection" also has a capability string, which gives the
 * capability of the executable at the other end of the connection.
 * So for the client, the capability of the server is in
 * aconnection.capability, and for the server, the capabilities of 
 * connected clients are in game.players[i]->conn.capability
 *
 * Client and server software can test these strings for a capability by
 * calling the has_capability fn in capability.c.
 *
 * Note the connection struct is a parameter to the functions to send and
 * receive packets, which may be convenient for adjusting how a packet is
 * sent or interpreted based on the capabilities of the connection.

-- David

Attachment: cap2.diff.gz
Description: GNU Zip compressed data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] per-connection capabilities patch, David Pfitzner <=