[CF List] CF 0.95.6 Client discards commands under "load" - feature, not bug

Frank McKenney frank_mckenney at mindspring.com
Thu Jun 29 23:28:27 CDT 2000



Users with high-speed connections to relatively fast Crossfire servers
will probably not need the following information.  However, those with
slower connections and/or slower servers may find it of interest.

--

Crossfire clients and servers are hosted on a variety of systems.  The
client accepts commands from the user, pass them to the server, and
present the results of the server's response back to the user.  Under
certain circumstances it is possible for the client to send commands to
the server faster than the server can respond to them; if this continues
long enough, commands will be buffered in the server and in the client
(not to mention the keystrokes in the client's host system keyboard
buffer) up to the limits of these buffers.

The rate at which "the pipe" fills depends on several factors,
including:

 - How fast the user is typing,
 - How "leveraged" any 'bound' keystrokes happen to be,
 - The speed of the link between the client and the server,
 - The basic speed of the Crossfire Server host machine, and
 - How much of a load Server and host machine are experiencing.

The "leveraging" is an (oog!)  key factor, since the Crossfire 'bind
command makes it possible to define a single key to execute multiple
commands.  With a high leveraging factor (say, one key = 10 searches),
pressing this key rapidly or holding it down to generate repeat
keypresses continuously can easily generate commands from the client
faster than some servers can respond to them.

Used carelessly, this could be fatal.  Imagine that you are "searching"
a stack of chests for traps.  You press the 'S' key (which you've
defined to invoke 10 searches per keypress) and hold it down for several
seconds to make sure you don't miss any well-hidden traps.  Suddenly a
Red Dragon appears...  and you can't interrupt your searching.  Foom!
You just became a crisped critter!

In CF 0.95.6, the client keeps track of the number of commands sent to
the server and the number of responses received.  If the number of
outstanding commands exceeds a limit value (default of 10), the client
will start discarding repeats of movement and 'firing' commands
(including such things as skill use and spellcasting).  The specifics
can be found in the send_command() function in player.c.

When commands are discarded, the Linux client writes
messages to stderr like the following:

  Wont send command use_skill praying - window oversized 205 164
  ...
  Wont send command search - window oversized 2 217

    
    


More information about the crossfire mailing list