tylerjemarshall / ChatServer

Will support lobbies and mini-games.
Eclipse Public License 1.0
0 stars 0 forks source link

Implement Server Commands (Framework Problem 3) #5

Closed tylerjemarshall closed 9 years ago

tylerjemarshall commented 9 years ago

Implementing server Commands
When a user logs in to the server place them in a room called “commons”. Create a command called “#join ” that allows users to enter a room. Modify the server so chat messages are only heard by other people in the room. Create a “#yell ” command that is heard by everyone in all rooms.

Currently the server does not allow any user input. Study the way user input is obtained from the client using the client console. Create a similar mechanism for the server. Any message from the server should be prefixed with : “SERVER MSG>” Implement the following commands for the server:

quit causes the server to quit gracefully

stop causes it to stop listening for new clients (but not disconnect existing clients)

close causes it to stop and disconnect all existing clients

start cases it to start listening for new clients again.

getPort and #setPort need no description.

allowyell once implemented only users who have been granted the yell permissions can issue the yell command implemented above.

robbytraf commented 9 years ago

Commands work successfully, but an issue with a client's connection to the server that has stopped listening, client will try to connect indefinitely (loops). Needs a time-out for client.