You will use thread to implement a chat room that includes mulitiple clients and a server.
Client program provides commands: **login** (allow users to join chat room), **send** (unicast or broadcast a message; actually send message to server and server forwards message), **logout** (quit chat room), and **who** (list all clients in chat room).
Server runs chat room service, manages all clients and distributes messages. Server port number is 123456
Set MAXCLIENTS = 3.
Use these initial user accounts (UserID, Password): (tom, tom11), (david, david22), (beth, beth33), and (john, john44).
1. **login** UserID Password
If server can verify UserID and Password, server will send a confirmation message to client and inform all other clients that this client joins chat room; otherwise, server will decline login and send an error message to client.
2. **send all** message
Send “message?? to server. Server will precede message with UserID of sender and broadcast message to all other clients.
3. **send UserID** message
Send “message?? to server. Server will precede message with UserID of sender and unicast message to client “UserID??.
** List all clients in chat room.
** Logout from chat room. Once logout, connection between server and client will be closed. Server will inform all other clients that this client left.
DO NOT USE ANY GRAPHICAL USER INTERFACE
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Java in Unix shell