예제 #1
0
def main():
    tornado.options.parse_command_line()

    if sys.argv[1] == 'server':
        server = Server()
        server.start(options.host, options.port)
        ioloop.IOLoop.instance().start()
    elif sys.argv[1] == 'client':
        client = Client(callback=cb)
        client.connect(options.host, options.port)
        ioloop.IOLoop.instance().start()
예제 #2
0
def main():
    tornado.options.parse_command_line()

    server = Server()
    server.start(options.host, options.port)
    ioloop.IOLoop.instance().start()