A multithreaded client-server chat application
This directory contains a command line chat room application. The user needs to
supply a file containing valid usernames and passwords that hosts can use to
log in. A default set has been provided. Do not change the file name. A Makefile
is also provided.
logout
command.make compiles the source files
make clean will clean all auxiliary files.
Needs to be in plain text and can only contain alphanumeric characters,
else it will display an error message and shutdown to allow for correction.
Once the server is started, it will hash these credentials using the SHA1
algorithm and replace this file with another file with the same name. The
original file will be renamed to “UserPass.OLD”. The hash will also be formatted
in hexadecimal. Credentials need to be provided in the following format:
<username> <password>
<username> <password>
....
make
java Server <server port>
java Client <server address> <server port>
An example after successfully starting the server and client, and successful
authentication (user):
help
commands:
who
last <number>
broadcast <message>
send <user> <message>
send (<user> <user> ... <user>) <message>
logout
who
[user]
broadcast hello
last 10
[user]