I followed the video of Mr Bruno Rocha to implement simple websocket, the
controller is very simple:
@auth.requires_login()
def index():
form = SQLFORM(Post, formstyle='divs')
if form.process().accepted:
websocket_send('http://127.0.0.1:', 'hello', 'mykey', 'mygroup')
I have tried the websocket_messaging (gluon/contrib/websocket_messaging.py)
on a Windows 10 laptop - it works very fine!
The next step was an impementation on a Linux machine (Ubuntu 14.04.4, last
Web2py version 2.14.6)
The line
websocket_send('http://localhost:', form.vars.message,
2 matches
Mail list logo