File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ Inspired by `Flask-Sockets <https://github.com/kennethreitz/flask-sockets>`_.
9
9
from flask.ext.uwsgi_websocket import WebSocket
10
10
11
11
app = Flask(__name__ )
12
- websocket = WebSocket(app)
12
+ ws = WebSocket(app)
13
13
14
- @websocket .route (' /echo' )
15
- def echo (websocket ):
14
+ @ws .route (' /echo' )
15
+ def echo (ws ):
16
16
while True :
17
- message = websocket .receive()
18
- websocket .send(message)
17
+ msg = ws .receive()
18
+ ws .send(message)
19
19
20
20
Installation
21
21
------------
@@ -72,4 +72,4 @@ Flask-uWSGI-Websocket automatically performs the WebSocket handshake for you and
72
72
73
73
``websocket.send_binary_from_sharedarea(id, pos) ``
74
74
75
- In addition there is a special ``websocket.receive `` method which makes using non-blocking calls simpler.
75
+ In addition there is a special ``websocket.receive() `` method which makes using non-blocking calls simpler.
You can’t perform that action at this time.
0 commit comments