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()
def main(): tornado.options.parse_command_line() server = Server() server.start(options.host, options.port) ioloop.IOLoop.instance().start()