Repository files navigation
Chatroom starts server and connects up to 10 clients simultaneously
The chatroom allows clients to send direct messages with other connected users, broadcast an insult message, query connected users
It contains a template folder with insult grammar, imports a random sentence generator library, which imports gson to parse json files.
Run the class ChatRoom.java main function (this is the server class).
The server port number is 8000, and the hostname is local host (assuming local connection)
Starts by typing a user name
Client class contains the client
Edit the client.java configuration, input the host as localhost, port 8000.
Click modify options to enable running multiple clients
the command includes the command key word, followed by a space, and a message
type ? to show a list of all valid commands.
valid command list
?: list all commands
logoff: sends a DISCONNECT_MESSAGE to the chatroom
who: sends a QUERY_CONNECTED_USERS to the chatroom
@user: sends a DIRECT_MESSAGE to the specified user to the chatroom
@all: sends a BROADCAST_MESSAGE to the chatroom, to be sent to all users connected
!user: sends a SEND_INSULT message to the chatroom, to be sent to the specified user
You can’t perform that action at this time.