I need a multi-threaded TCP chat server, written in C, that will compile on FreeBSD.
It should handle up to 1,000 clients at the same time. The server should support two kinds of messages:
1) Broadcast messages that are sent to all active clients.
2) Private messages that are sent to (at most) a single client.
The server should also:
- Make sure there are never two users with the same user name.
- Supply a list of who is currently logged on.
- Supply a list of the commands supported by the server.