class Push(protocol.Protocol):
    """This is just about the simplest possible protocol"""

def connectionMade(self):
    for line in thedata:
        pass
Twisted: tcp server with push producer example?