daleken/
daleken/data/notes/
daleken/data/player/
daleken/data/system/poses/
daleken/doc/Homepage/images/
daleken/log/
Mud Client Compression Protocol support for DalekenMUD

Originally written by
Oliver Jowett <oliver@randomly.org>, 990310

Modified for DalekenMUD, 2000, Martin Thomson <mwt02@uow.edu.au>


The two main benefits of MCCP are:

1. lower bandwidth use by the mud.
2. clients (i.e. players) get large responses (such as, for example, combat
   spam) from the mud at a higher rate - the mud will "feel" faster, despite
   the fact that the actual round-trip times are unchanged, especially
   for larger blocks of text.

With a suitable client, MCCP is entirely transparent to the user - it
automatically enables itself when supported by both the server and client.

For more details on the protocol, and a list of clients and servers currently
supporting it, see <URL:http://www.randomly.org/projects/MCCP/>. If
you add MCCP support to your mud or a mud client, mail me and I'll add it to
the list.

To use this patch, you will need a copy of zlib installed - see
<URL:http://www.cdrom.com/pub/infozip/zlib/>. Many systems will already have
a version installed.

Copyright/usage: see mccp.c - in essence, use as you wish, as long as
copyright notices are retained.


Using MCCP with Daleken MUD

By default MCCP is disabled in Daleken.  This is because we know that zlib is
not available on ALL platforms and additionally the compression requires
extra resources that you may not wish to allocate to the server.

At the moment MCCP is only available for Unix based systems, anyone who ports
this code to Windoze will gain my respect, I myself couldn't be bothered.

Edit the Makefile (or GNUmakefile if you use GNU make, both if you
aren't sure) and make the following changes:
 Add '-lz' to LINKLIB.
 Add 'mccp.c' to C_FILES (and 'mccp.o' to the O_FILES).
 Add '-DMCCP' to CFLAGS line.

Now ensure that everything is compiled properly by typing 'make clean' before
you continue.


CAVEATS

. Testing has only been done over local loopback. Unforeseen bugs due to
  timing or network error handling etc. are possible.

. The simple-but-stupid approach has been taken. Much of the network I/O code
  could do with a rewrite, but I've left it mostly as-is and only changed
  those parts that are necessary to implement mccp.
. Telnet option negotiation and handling of IAC sequences is very naive (but,
  it's completely nonexistent in the base code..)
. Telnet option negotiation is not done continuously, but only when the
  client enters a complete line, this does make it a fair bit more simple
  though as end-of-line characters ensure that the code isn't split
  somewhere.


Daleken Improvements

. Compression code is much simplified, it all goes through a central
  compress_process function.  Network I/O is also streamlined through
  Daleken's standard I/O paths.
. Support for version 2 of the protocol.