Example chatserver class — an extremely crude and simple chat server
that demonstrates how to use Poll to do
multiplexing IO in a single thread.
Instantiate and return a chatserver on the specified host and port
Handle a poll event specified by evmask on the specified
socket
Process the specified input from the specified user
Handle the specified command from the specified user
Broadcast the specified message to all connected users
Broadcast the specified message from the specified user
Disconnect the specified user
Disconnect all connected users
Build and return a list of connected users for the specified user.