Questions tagged [flask-socketio]

Flask-SocketIO lets Flask python applications access low latency bi-directional communications between the clients and the server

Flask-SocketIO is an open source library which implements the abstraction, for delivering low latency client-server communication in a application developed by Miguel Grinberg.

1052 questions
0
votes
1 answer

Connecting flask-socketio with user_loader

Warning: Apologies for the long post We are currently running a flask server with a couchdb backend. We have a few API endpoints that provide user information. We've used flask-login for user management. THe user_loader checks the user database…
galeej
  • 535
  • 9
  • 23
0
votes
1 answer

Why flask background thread get wrong database information?

In order to push real time database info to client, I use flask-socketio in server side by using websocket to push all real-time database info to client. There is a snippet of my view file: from ..models import Host from flask_socketio import emit,…
buweilv
  • 451
  • 1
  • 4
  • 18
0
votes
1 answer

Flask Socket.IO seems to revert to polling

So i'm using flask_socketio and using the example from here and when i visit the webpage my chrome dev console shows this. Are those polling requests just keeping the socket alive or is it reverting to polling? Thanks for the help
0
votes
2 answers

Background thread gets started twice with Flask-Socketio

I have created a small Flask webapp using socketio that is supposed to visualize a brew controller. The hardware is a Raspberry Pi and the controller part (hardware binding and data collection) is done in a separate background thread which is…
MrLeeh
  • 5,321
  • 6
  • 33
  • 51
0
votes
0 answers

Scrapy get error 'DNS lookup failed' with Celery eventlet enable

I'm using Scrapy in Flask and Celery as a background task. I start Celery as normal: celery -A scrapy_flask.celery worker -l info It works well... However, I'm going to use WebSocket in scrapy to send data to Web page, so my code is changed in…
jiayi Peng
  • 325
  • 3
  • 11
0
votes
0 answers

integrating zmq into flask-socketio app as (kombu) message_queue transport

I am working on a Flask-SocketIO application that integrates with zmq. The basic premise of the app is that a zmq message is received by the Flask-SocketIO web server, then that zmq message is converted to a SocketIO message which is sent along to…
Eric S.
  • 320
  • 2
  • 11
0
votes
1 answer

Return personal infomation to each player when any player make a post

I try to make a simple game using HTML5, flask and flask_socketio (a flask extension of webSocket). I can connect all the player to the server, and return information to each (this is the easy part). My question is, When a player modifies something,…
F.N.B
  • 1,539
  • 6
  • 23
  • 39
0
votes
0 answers

Duplicated connections in chat when opening multiple page

I have a basic chat that works fine, however when a user opens another page (/chat and /profile at same time) I get another connection, and same user will have duplicated sessions in the chat page. What I am looking for a way to avoid this behavior.…
user455318
  • 3,280
  • 12
  • 41
  • 66
0
votes
1 answer

Why can't this socket be accessed from JavaScript web worker?

I want to stream audio buffers from JavaScript to my flask server, using socket.io. But the socket instance is 'undefined' when I want to use it from within the audio callback function. In this code, my socket instance in the main thread is…
user2212461
  • 3,105
  • 8
  • 49
  • 87
0
votes
1 answer

SocketIO not receiving message in JS

I'm trying to implement a FlaskSocketIO with socket.io.js application for real-time communication between frontend and my web socket server The frontend code looks like that: $(document).ready(function() { namespace = '/test'; var…
0
votes
0 answers

Pyudev's ObserverMonitor locks up GIL when monkey patched

Whenever I use eventlet's monkey patching (necessary for Flask-SocketIO) the disk_monitor_thread() prevents other threads from firing. Eventlet and monkey patching is a must for me. Is there a way to get pyudev's MonitorObserver to place nice and…
Kenny Powers
  • 1,254
  • 2
  • 15
  • 25
0
votes
0 answers

receive duplicate messages with socket io

I'm new to socket io and I'm quite confused because I receive duplicate messages from the server. I'm using flask-socketio on the server side. Here's the server side code: class StdOutListener1(StreamListener): def on_data(self, data): …
al3xtouch
  • 491
  • 4
  • 19
0
votes
1 answer

socket io code confusing

This is in base_manager.py in socket_io python server--> How does this code make any sense? I want to emit a message. How could that ever work if there are no rooms? If namespace not in self.rooms--> there is no room so it will always return back to…
KonradS
  • 91
  • 1
  • 5
0
votes
0 answers

Send messages to the default room with Flask-SocketIO

I am trying to build a notification system with Flask-SocketIO. I want that the server should be able to send messages independently to any chosen client. I am trying to achieve this by keeping each client in a separate room (the default session ID…
Uday Mittal
  • 73
  • 2
  • 8
0
votes
1 answer

Live update image while using socketio

I'm using python to push every nth image from a scientific camera to a web page. The webpage updates the image using .replace(). It's probably important to note that this is not a webcam - it's a scientific cam. I'm using the developer software to…
Fonty
  • 239
  • 2
  • 11