REPORT

This package is called "message center", it includes three
main parts: messser, cmdcli and discli.

1 messser

The messser is the server program of this system. It can 
accept connections on three different ports: message receive
port, message display port and server control port. The port
numpbers are defined in ms.h. The current defination for the
three ports are, 1500 for message receiver port, 1501 for
message display port and 1502 for server control port. These
port number can be modified within suitable range and will not
affect the functions of this system.

Each port of messser can accept one or more connections at the
same time. The maxmum number of connections for each port are
defined in ms.h. The current defination is:

#define MAXREC 3
#define MAXDIS 2
#define MAXCMD 2

This defination can be modified within reasonable range.

The messser will accpet any connections to the message receipt
port until the maxmun number of connections for this port is 
reached. But when some connections are closed, this port is
availabe again( this feature is the same to other ports). The
messser receive and store(temporarily) message from message 
receipt port. When a new message is received by the same connections,
the previous message recived by this connection will be replaced.
The maxmum length of one message is defined in ms.h. the current
 defination is 2048. This defination can be adjusted within suitable
range. When the client send EOF, the connection will be closed.

The messser will just accpet loopback connections to the message
display port. It will ingore any data written to it through this
port. But will close the connection if EOF received from this 
port. Whenever any message received from any message receive 
connection, the message will be sent to all the connections on
message display port. The message will be sent by two part:
message title and message body. The message title is formatted 
as follow:

Message received from <ipaddr> (<port>) at <datestring>:\n\n

The message body will be exactly the same as message received.
Both the message title and the message body are sent following a
four byte(long) value in network order, which contains a value 
denoting the number of bytes to follow.

The server control port can be connected from any address. It will
receive line command and give related response. Now the following
commands are valid.

user <username>			login a user
pass <password>			input password
client list			list all client curently connected
				to the server's message display port
client delete <ipaddress> <port> delete the specified client
message list			list all the message currently stored
				in the server
message delete <ipaddress> <port> delete the specified message

help				list all valid password
quit				close the connection of this port
shutdown <password>		shutdown the server

Except the user, pass, help and quit command, all the other commands
are aviable only after the users has the correctly input username and
password. Now the system has two valide user "test" with password "ok"
and "itb542" with password "sesame". When one client is connected to 
this port, server will send it a prompt of "==>", when this client has
successfully login, the server will change the prompt to ":-)". The out-
put from every command is a series of lines terminated by an empty line.

2 discli

This is the message display client. It will connect to the message 
display port of the messser and will write all received message to
the standard output. You can use ^D to terminate this client.

3 cmdcli

This is the command client. It will connect to the server control
port. It can be used to send command to the server and display the
respond message at the stand output.




