Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bae2365

Browse files
author
zeekay
committed
Update README.
1 parent 49598c1 commit bae2365

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ automatically for you.
7272

7373
API
7474
---
75-
Flask-uWSGI-Websocket automatically performs the WebSocket handshake for you
76-
and passes your route handler a websocket client exposing `uWSGI's WebSocket API
75+
``flask_uwsgi_websocket.WebSocket``
76+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77+
Automatically performs WebSocket handshake for you, but otherwise only exposes
78+
the `uWSGI WebSocket API
7779
<http://uwsgi-docs.readthedocs.org/en/latest/WebSockets.html#api>`_.
7880

79-
``websocket.recv()``
81+
``websocket.recv()`` (alias ``websocket.recveive()``)
82+
83+
``websocket.recv_nb()``
8084

8185
``websocket.send(msg)``
8286

@@ -88,9 +92,16 @@ and passes your route handler a websocket client exposing `uWSGI's WebSocket API
8892

8993
``websocket.send_binary_from_sharedarea(id, pos)``
9094

91-
In addition there is a special ``websocket.receive()`` method which tries to
92-
make non-blocking calls simpler. When using the ``WebSocket`` plugin, it blocks
93-
making it appropriate for threaded or multiprocess concurrency models. When
94-
using ``GeventWebSocket`` it'll take advantage of gevent and make a
95-
non-blocking recv call. ``AsyncWebsocket`` should do roughly the same thing,
96-
but currently plain ``--async`` concurrency model is a bit buggy in uWSGI 2.0.
95+
``flask_uwsgi_websocket.GeventWebSocket``
96+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97+
Fancier WebSocket abstraction that takes advantage of Gevent loop engine. Route
98+
handlers are spawned in their own greenlets and able to easily send messages to
99+
each othek.
100+
101+
``websocket.recveive()``
102+
103+
``websocket.send()``
104+
105+
``websocket.close()``
106+
107+
``websocket.connected``

0 commit comments

Comments
 (0)