jrdh / blorp-python

Client for Blorp which allows socket.io connections to be used from Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send return value from @on function in BaseWebsocketHandler to simplify responses

jrdh opened this issue · comments

When you have a handler function which responds to a websocket message using the @on annotation you have to call

yield from self.app.send_async(self.websocket_id, 'something', {'message': 'Hello, world!'})

to send a message back down the websocket.
The return of the function should be taken by the handler and automatically sent back to the websocket (it it is non-null).