raise RuntimeError('You need to use the eventlet server. '
问题 In my project, I created a app : the website_chat/views.py code: async_mode = 'eventlet' import os from django.http import HttpResponse import socketio basedir = os.path.dirname(os.path.realpath(__file__)) sio = socketio.Server(async_mode=async_mode) thread = None the website_chat/management/commands/runserver.py : from django.core.management.commands.runserver import Command as RunCommand from xxx/website_chat.views import sio class Command(RunCommand): help = 'Run the Socket.IO server' def