Asynchronous socket server in python

The code for a very simple asynchronous socket server written in python utilizing the asynchat module. It’s all in good fun.

Booting the server is a matter of python

After that, telnet can be used to induce messages, as such:

$ telnet localhost 12345
The same will be true for any amount of clients. This is so simple. Love it.

  • Mark

    Wow thanks for the great bit of code. I’m a newbie at Python and this is exactly what I was looking for to learn asyncore

  • wildman

    error in line 22: asynchat.async_chat.init(self, sock=conn)