Skip to content

Commit

Permalink
Remove references to gevent-websocket which is not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jan 4, 2024
1 parent 6967eca commit 0aa8683
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions docs/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 845,9 @@ database drivers are likely to require it.
Gevent
~~~~~~

`Gevent <http://gevent.org/>`_ is another asynchronous framework based on
coroutines, very similar to eventlet. An Socket.IO server deployed with
gevent has access to the long-polling transport. If project
`gevent-websocket <https://bitbucket.org/Jeffrey/gevent-websocket/>`_ is
installed, the WebSocket transport is also available.
`Gevent <http://gevent.org>`_ is another asynchronous framework based on
coroutines, very similar to eventlet. An Engine.IO server deployed with
gevent has access to the long-polling and websocket transports.

Instances of class ``socketio.Server`` will automatically use gevent for
asynchronous operations if the library is installed and eventlet is not
Expand All @@ -865,15 863,6 @@ using the provided ``socketio.WSGIApp``::
from gevent import pywsgi
pywsgi.WSGIServer(('', 8000), app).serve_forever()

If the WebSocket transport is installed, then the server must be started as
follows::

from gevent import pywsgi
from geventwebsocket.handler import WebSocketHandler
app = socketio.WSGIApp(sio)
pywsgi.WSGIServer(('', 8000), app,
handler_class=WebSocketHandler).serve_forever()

Gevent with Gunicorn
~~~~~~~~~~~~~~~~~~~~

Expand All @@ -883,10 872,6 @@ command to launch the application under gunicorn is shown below::

$ gunicorn -k gevent -w 1 module:app

Or to include WebSocket::

$ gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 module: app

Same as with eventlet, due to limitations in its load balancing algorithm,
gunicorn can only be used with one worker process, so the ``-w`` option cannot
be higher than 1. A single gevent worker can handle a large number of
Expand Down

0 comments on commit 0aa8683

Please sign in to comment.