You are missing the point of the websocket system. You do not pass data when you connect it. You pass data using JS after you connect to it.
You can change this behavior (and I can see use cases when you have to) but you would have rewrite your own server side code. Massimo On Thursday, 5 March 2015 17:30:02 UTC-6, Manu Mora wrote: > > In websocket_messaging.py there are the following code: > > class DistributeHandler(tornado.websocket.WebSocketHandler): > def open(self, params): > group, token, name = params.split('/') + [None, None] > self.group = group or 'default' > self.token = token or 'none' > self.name = name or 'anonymous' > > I want to send some parameters like token or name. I have tried several > options: > > if(!web2py_websocket('ws://127.0.0.1:8888/realtime/chat?name=name', > function(e){ > > > if(!web2py_websocket('ws://127.0.0.1:8888/realtime/chat/name',function(e){ > > I would like to send some data to websocket server, however I don't work. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.