예제 #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
파일: examples.py 프로젝트: radix/corotwine
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
파일: bigdemo.py 프로젝트: bizhan/notes
def twisted_corotwine(port):
    gListenTCP(port, Chat().handleConnection)