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
0 answers

flask socketio - need to emit twice with sleep in between

I have a development where a click of a button on the client webpage initiates the server to move a motor connected to the server box by USB. What I would like is for the server to emit a message on receipt of the client request to acknowledge the…
Fonty
  • 239
  • 2
  • 11
0
votes
0 answers

Flask-Login and Flask-SocketIO current_user.is_authenticated issue

I am using Flask-Login to log in users and wanted to be able to log out a user (I want to track session times) if they closed their browser before manually logging out of the Flask app. This can be done with…
Don Smythe
  • 9,234
  • 14
  • 62
  • 105
0
votes
0 answers

Websockets "invalid frame header" error Flask-Socket IO

I am using flask-socketio and everything works awesome but when sending one value using emit, the chrome developer tools is showing error BUT EVERYTHING IS WORKING AS EXPECTED. "WebSocket connection to…
0
votes
1 answer

How to connect multiple clients in Flask using socket.io?

I want to get data in my Flask server from a socket.io client. My setting is: Client1 calls method request_data on server. The method request_data then emits 'client2' event on Client2. I have the following method in my flask…
user2212461
  • 3,105
  • 8
  • 49
  • 87
0
votes
2 answers

Angular single page app and socketio multiple sockets

I have yet to find a solution or any information on this topic. Basically I am developing a chat app with flask, socketio, and angularjs. I created a single page app with angularjs so when I click for example a register button this page comes into…
0
votes
0 answers

socketio connects with polling after a websocket connection is established. blocks communication

I've been struggling with a strange problem with my websocket connection. I use socketio 1.4.5 to connect to the server (flask, flask-socketio, gunicorn, nginx). The problem is that about 1 of 8 connection attempts socketio connects using xhr…
Easyrider
  • 3,199
  • 5
  • 22
  • 32
0
votes
1 answer

merge flask_socketio into my own flask project

I developed my restful api flask project (let's call it 'MYOWN'). And then, because of some needs to implement functions like 'notification', 'chat', and so on, I tried to merge my project with simple socketIO example project. I want to run my…
HT.Cha
  • 13
  • 4
0
votes
1 answer

Why is data being lost in socket.io?

I'm building a small app that tails a log and displays it on the client. However, when I append lines to my log, I lose some data. Here's the relevant Python handler: @socketio.on('Request logs') def handle_request_logs(): logfile =…
erip
  • 16,374
  • 11
  • 66
  • 121
0
votes
2 answers

Streaming live data in HTML5 graphs and tables

I have developed a python web application using flask microframework. I have some interactive plots generated by Bokeh and some HTML5 tables. My question is how I can update my table and graph data on fly? Should I use threading class and set the…
Hamid K
  • 983
  • 1
  • 18
  • 40
0
votes
2 answers

flask-socketio: before_send/after_send

On flask socket-io, if there are 2 users connected and user1 sends a message to user2, how can I intercept the payload being sent to user2 (on the app context of user2, in order to modify it)? I do not want to modify the payload being sent by user1…
ptou
  • 323
  • 4
  • 12
0
votes
1 answer

Flask-SocketIO Error during websocket handshake Unexpected response code: 400

This seems similar to some unanswered questions on stack overflow. I am running a python socketio app on heroku and I get this error when I launch the website : Error during websocket handshake Unexpected response code: 400 I kept thinking this…
Denny George
  • 535
  • 1
  • 6
  • 19
0
votes
0 answers

Socket IO 1.x server library for python

is there any socket io 1.x server library for python? I have found https://github.com/miguelgrinberg/Flask-SocketIO but only support for socket io version 0.9.16, this is the author say : Please do not use the new socket.io 1.0 client libraries,…
0
votes
1 answer

Flask.socket_io blocking calls when database queries are run

I am trying to use socket_io with my flask application. The problem is when i run database queries, like in the url_route function below. The first time the page loads properly but on consecutive calls the process goes into a blocking state. Even…
codename_subho
  • 456
  • 8
  • 22
0
votes
0 answers

How can I made a flask app availible for one client at the same time

I want to make a webapp which can only be edited by one client at the same time. I use flask and flask-socketio. After the authorized client leaves (disconnect event in socketio) the next should be able to edit things. Right now I have multiple…
wenzul
  • 3,948
  • 2
  • 21
  • 33
-1
votes
0 answers

Flask python - Single API shouldn't timeout

I'm using flask framework, and we have set in aws that API should timeout at 25s, but now I just want one API to not timeout at 25s (and I can't change AWS settings) -> as all other API's should timeout at 30s. What is the way to do this? I'm not…