An async i/o library.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
mayloop
LICENSE.txt
MANIFEST.in
README.rst
ez_setup.py
setup.py

README.rst

mayloop

An asynchronous i/o library.

Features

  • Asynchronous i/o loop to run socket servers.
  • Telnet interface to control the loop, print the stats, etc.

Usage

The following code sample creates a simple protocol that just sends back the message it receives and then starts a server that will use the protocol:

class Talkback(FixedLengthMessage):
        def messageReceived(self, message):
                self.sendMessage(message)

config = Config()
config.add_service('', 8080, Factory.forProtocol(Talkback))

server = MainLoop(config)
server.start()

Download