def handle(self, *args, **options):
        """Run gevent socketio server."""
        logging.basicConfig()
        logging.getLogger().setLevel(logging.INFO)
        try:
            port = int(args[0])
        except:
            port = 8000

        # Make blocking calls in socket lib non-blocking:
        monkey.patch_all()

        # Start up gevent-socketio stuff
        application = WSGIHandler()
        print 'Listening on http://127.0.0.1:%s and on port 843 (flash policy server)' % port
        SocketIOServer(('', port), application,
                       resource='socket.io').serve_forever()
dataset/ETHPy150Open kumar303/jstestnet/jstestnet/system/management/commands/run_gevent.py/Command.handle/original