A simple experiment in doing a TCP connection based chat server with Tornado. The server has two states:
- AUTH: wait for the user to enter a unique name. Once done they join CHAT.
- CHAT: Each line of text is sent to all other users connected to the server.
The sample also broadcasts messages when users connect to CHAT (state) and leave CHAT (state)
I wrote this simple to learn something about Python and Tornado. I based it on the echo server by phus which can be located here: http://tornadogists.org/1231481/