2011/7/20 Roberto De Ioris <[email protected]>: > > Il giorno 20/lug/2011, alle ore 16.24, Szymon Kosok ha scritto: > >> Hi, >> >> I've asked this question on StackOverflow but I think it's better ask >> here, so I copy&paste question. >> >> We are trying to integrate Socket.io with our website. All messages >> are sent with uWSGI workers (Django). My problem is, that every >> message does all connection magic. It looks now like that: >> >> Request -> HTTP Handshake with Socket.io -> Websocket connection -> >> Data send -> Connection close >> >> And repeat for every message that need to be send to socket.io. It's >> far from ideal. Sometimes there are 3-4 messages queued / request. Is >> there way to share socket connection within requests with uWSGI? I >> don't need sharing between workers, just only within all requests >> processed by particular worker. Or maybe there are other solutions for >> that problem? >> >> Best regards. >> > > Hi, can you post the code you use to connect to the socket.io server ?
Sure. :) I'm using websocket-client http://pypi.python.org/pypi/websocket-client/0.4 and based on that module my class: http://dpaste.com/572402/ (because socket.io needs some funky handshake via http). _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
