Chat Server
The program should implement a chat server that is able to attend multiple clients at the same time. It can be implemented by either using a dedicated client or using the
telnet
program. It should be able to have at least 10 rooms for conversation. The clients should be able to create new rooms.
Commands:
list List the names of all rooms.
nickname <name> Gives a name for the user.
join <room name> Joins a room.
\ Leaves a room (only command possible inside a room).
Events that should be broadcasted for all room members:
New user enters room.
Whatever a user types.
User leaves room.
Examples:
User hotair enters room pingpong.
User niceperson: Welcome hotair !
User hotair: Hi.
...
User hotair: I don't like you, niceperson.
User hotair leaves room pingpong.
NOTE: The program must use shared memory and threads in its implementation (take care to protected shared memory areas with mutex and/or semaphores). The program does not need to keep information on files, it does not have to be persistent.