class SendContent(Protocol):

    def connectionMade(self):
        self.transport.write(self.factory.text)
self.transport.loseConnection()
Multiple simultaneous network connections - Telnet server, Python