Пример #1
0
def startServers():
    gListenTCP(1025, discard)
    gListenTCP(1026, qotd)
    gListenTCP(1027, echo)
    gListenTCP(1028, chargen)
    gListenTCP(1029, fetchGoogle)

    from twisted.internet.protocol import Factory
    ampf = Factory()
    ampf.protocol = GoogleGetter
    reactor.listenTCP(1030, ampf)

    chat = Chat()
    gListenTCP(1031, chat.handleConnection)
Пример #2
0
def startServers():
    gListenTCP(1025, discard)
    gListenTCP(1026, qotd)
    gListenTCP(1027, echo)
    gListenTCP(1028, chargen)
    gListenTCP(1029, fetchGoogle)

    from twisted.internet.protocol import Factory
    ampf = Factory()
    ampf.protocol = GoogleGetter
    reactor.listenTCP(1030, ampf)

    chat = Chat()
    gListenTCP(1031, chat.handleConnection)
Пример #3
0
def twisted_corotwine(port):
    gListenTCP(port, Chat().handleConnection)