Chat-server based in https://github.com/jasonish/libevent-examples/tree/master/chat-server