Questions tagged [gevent-socketio]

WebSocket-like abstraction that enables real-time communication between a browser and a server.

88 questions
20
votes
2 answers

How to emit SocketIO event on the serverside

I'm running a gevent-socketio Django application. I have something similar to this class @namespace('/connect') class ConnectNamespace(BaseNamespace): def on_send(self, data): # ... However, if I receive the events from the javascript…
Jan Vorcak
  • 19,261
  • 14
  • 54
  • 90
13
votes
1 answer

gunicorn, nginx (v 1.3.14), django, and gevent-socket.io, on dotcloud

I am trying to deploy gunicorn + gevent behind nginx (v 1.3.14) on dotcloud. I have a few questions about it. I am aiming to adapt the python-on-dotcloud example. So far, I have not been able to get the websockets portion working with this setup.…
t1m0
  • 735
  • 1
  • 7
  • 14
9
votes
3 answers

How make a python windows service of a flask/gevent.socketio server?

I have a flask/gevent SocketIOServer and need to make it work as a service: class TeleportService(win32serviceutil.ServiceFramework): _svc_name_ = "TeleportServer" _svc_display_name_ = "Teleport Database Backup Service" _svc_description_…
mamcx
  • 15,916
  • 26
  • 101
  • 189
8
votes
1 answer

python.h not found when trying to install gevent-socketio

here is my error when I try to install gevent-socketio Installing collected packages: gevent, greenlet Running setup.py install for gevent building 'gevent.core' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall…
mdlx
  • 125
  • 1
  • 10
7
votes
3 answers

gevent-socketio nginx uwsgi not working together on development server

I am running a django project that uses gevent-socketio. For some reason on my development server, all my websockets requests are returning a 101 pending message at which socketio will start cycling through all the other protocols which result in a…
super9
  • 29,181
  • 39
  • 119
  • 172
6
votes
1 answer

Using Flask Session in Gevent Socket-IO

Good Morning, I have been having some trouble and I am hoping some one will be able to help me out a bit here. What I am trying to do is access the Flask Session within a Gevent Socket-IO Name space. I have tried to use beaker as a middle ware…
Recursive
  • 103
  • 2
  • 6
5
votes
1 answer

Flask-SocketIO Not Working On Apache/WSGI

I have used the following example code from http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent/page/4 and this works fine when I run it using the test server e.g. python myapp.py I can connect to it and send messages from…
user4143585
  • 105
  • 1
  • 2
  • 6
5
votes
1 answer

flask-socketio one room per user ? expensive?

I have a flask webapp running pandas to do some data analysis on the backend. Right now, i took the naive approach of using AJAX for user to send queries back to the server and interact with the data. but as it turns out there is a lot of overhead…
Shankar ARUL
  • 12,642
  • 11
  • 68
  • 69
5
votes
1 answer

Nginx and Flask-socketio Websockets: Alive but not Messaging?

I've been having a bit of trouble getting Nginx to play nicely with the Python Flask-socketio library (which is based on gevent). Currently, since we're actively developing, I'm trying to get Nginx to just work as a proxy. For sending pages, I can…
Namey
  • 1,172
  • 10
  • 28
4
votes
1 answer

Basic flask-socketio implementation not working; no output or errors

I'm trying to incorporate socketio with my flask project. Right now I am trying to get a simple "Connected" or "Disconnected" output from the server. However when I run the app script with "python app.py" I don't get these messages nor any errors…
SorenLantz
  • 177
  • 2
  • 14
4
votes
2 answers

python-socketio vs Gevent-socketio

I am choosing a python library to write a live-chat function page embed in my website. I found two libraries that based on Socket.IO, python-socketio and gevent-socketio: From python-socketio doc: Python implementation of the Socket.IO realtime…
aircraft
  • 25,146
  • 28
  • 91
  • 166
4
votes
1 answer

gevent-socketio send message from thread

I would like to use gevent-socketio to send messages from a worker thread and update all connected clients on the status of the job. I tried this: from flask import Flask, render_template from flask.ext.socketio import SocketIO, send, emit import…
Luke Yeager
  • 1,400
  • 1
  • 17
  • 30
4
votes
2 answers

Flask-socketio, emit an event to another namespace

I am using Flask-socketio (http://flask-socketio.readthedocs.org/en/latest/). I am currently getting a KeyError: '/local' when using this in events.py. Note the differing namespaces: @socketio.on('connect', namespace='/photo') def…
roowilliams
  • 173
  • 2
  • 10
4
votes
3 answers

GeventSocketIOWorker has no attribute 'socket'

I need to run Django application using gunicorn. I read documentation, and I think I set up everything like I should, but when I run gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker app.wsgi:application I get following error…
Jan Vorcak
  • 19,261
  • 14
  • 54
  • 90
3
votes
1 answer

Loop seems to break "emit" events inside Namespace methods [gevent-socketio]

since a few days I've been unsuccessfully trying to have some kind of loop in the server side that would allow me to update the client periodically, but it seems like if you put a loop into the server event method, it stops emitting events to the…
javidgon
  • 115
  • 8
1
2 3 4 5 6