Following files have been used in this project:

allocate.c connect.c err.c main.c 
map_ids.c readn.c reply.c request.c xmx.h

------------------------------------------------------------------------------

allocate.c: Extracts the resource IDs specified in the request depending on 
	    the request type and then stores it. 
------------------------------------------------------------------------------

connect.c: * Open connections with the clients as a server in order to receive 
	     request messages from the client.

	   * Sends the connection setup information to the server and buffers 
	     the information if it is a success.

	   * Connects the X multiplexer to an X server as a client.

------------------------------------------------------------------------------

map_ids.c: Routines to map resource IDs and Atoms.

------------------------------------------------------------------------------

request.c: * Receives request messages from the client.

	   * Map the ids from master id's to slave's id's, because client is
	     talking only with the master.

------------------------------------------------------------------------------

reply.c: * It receives the reply messages from the server.

------------------------------------------------------------------------------

Compiling the program:

Run make in the directory where source code has been copied. The executable 
will be xmux.

----------------------------------------------------------------------------

Running the program:

Steps before running the program:
---------------------------------

All servers on which X applications are to be displayed should be willing to
accept connections from the multiplexer. To ensure that each server can
accept such a connection, the {\em xhost} command could be used.
This procedure is illustrated in the following example, wherein
two machines, {\em eton.cslab.uky.edu} and {\em bath.cslab.uky.edu},
are considered. Suppose the X multiplexer will run on {\em eton.cslab.uky.edu}.

On both the machines, {\em eton} and {\em bath}, type:

{\em xhost +eton.cslab.uky.edu}

Now the X servers running on {\em eton} and {\em bath} are ready to accept
messages from the multiplexer which will run on {\em eton}.

Steps to run the xmux:
-----------------------

The X servers are now ready to accept connections from
{\em eton.cslab.uky.edu}. The host name of all the machines should be
passed as command line argument to the multiplexer as follows:

eton$>$ xmux -s eton.cslab.uky.edu bath.cslab.uky.edu

Here,

* eton.cslab.uky.edu is the active server,
* bath.cslab.uky.edu is the passive server,
* -s stands for host names. All the host names must be followed by -s.

The following message will appear on the screen:

The clients should do the following to talk to the X-multiplexer:
setenv DISPLAY eton.cslab.uky.edu:1.0

If any X client (X application) intends to speak to the multiplexer,
the DISPLAY variable must be set up as described above. This command
works fine for csh and its descendents, but not for ksh, sh and theirs.



