def runWithProtocol(klass, masterIP, port):
    fd = sys.stdin.fileno()
    oldSettings = termios.tcgetattr(fd)
    tty.setcbreak(fd)

    try:
        p = ServerProtocol(klass, masterIP, port)
        stdio.StandardIO(p)
        reactor.run()  #@UndefinedVariable
    finally:
        termios.tcsetattr(fd, termios.TCSANOW, oldSettings)
        os.write(fd, "\r\x1bc\r")
The L{Deferred} returned by L{ClientCreator.connectTCP} can be cancelled
dataset/ETHPy150Open rapyuta/rce/rce-console/rce/console/console.py/runWithProtocol--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/internet/test/test_protocol.py/ClientCreatorTests.test_cancelConnectUNIX