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
6
votes
2 answers

flask and flask-socketio flush all emit events

How do you flush a flask-socketio emit event so that multiple lines stream to the client, as opposed to multiple lines all coming through at one time? I'm working with Flask and flask-socketIO to make a web app that let's users play chess against…
Jeff Maxim
  • 93
  • 1
  • 6
6
votes
3 answers

Correct configuration for Flask SocketIO

I have been following this tutorial to try and get Flask SocketIO running using nginx and gunicorn. nginx server { location / { proxy_pass http://127.0.0.1:8000; proxy_redirect off; proxy_set_header Host $host; …
user2268507
6
votes
1 answer

Flask debug mode when using sockets

I'm building python Flask application which uses sockets (flask socketio). Basically, client will send some commands to server, which he wants to execute. Server will execute commands and also send sockets to client commands output. There is…
jan-hybs
  • 624
  • 2
  • 8
  • 18
6
votes
2 answers

Socket.io with flask-socketio python. How to set socket keepalive/timeout

I am struggling to find any documentation about a timeout value for socket.io. I am using //cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js on the client and Flask-SocketIO on the server side. Here is how I am creating the…
user1601716
  • 1,893
  • 4
  • 24
  • 53
5
votes
3 answers

Difference between the socket , socketio, and websockets

Can someone explain me difference between socket, socketio, flask socketio with respect to python? And for using it this socket with flutter what code should I write on backend? Like I should write sever and client or only client?
5
votes
2 answers

Flask-socketio disconnect a client

I am making a chat application using flask-socketio and now I want to emit a message to server with client's username when a client gets disconnected i.e. when client closes browser/tab so that I can emit that message from server to all existing…
Avisek SSarma
  • 177
  • 1
  • 4
  • 10
5
votes
1 answer

how to prevent valuerror: too many packets in payload in flask socketio

so i'm doing my final project. i want to get head pose estimation from client webcam. i succesfully stream the webcam to server with websocket. but when i try to put my head pose function inside the socket route, the terminal show error valueError:…
Farhan Rabbaanii
  • 393
  • 6
  • 16
5
votes
1 answer

WinError 10057 when connecting using websocket-client

I'm making a Flask webapp and I'm using Flask-Socketio. For various reasons, I have a need to also use the websocket-client package. Everything is working as intended, except that when I tried running the app on a different computer on a different…
Ahndwoo
  • 1,025
  • 4
  • 16
5
votes
2 answers

GET /socket.io/?EIO=3&transport=polling&t=MniHjPM HTTP/1.1

I have a simple Flask chat application that I am testing out coming from a tutorial. Supposedly I just need to run it using the "python app.py" command but when I access it via http://localhost:5000 i get a continuous message of this: I was hoping…
siopaoman
  • 1,733
  • 2
  • 12
  • 7
5
votes
3 answers

"ValueError: Invalid async_mode specified" when bundling a Flask app using cx_Freeze

I am building an API that uses Waitress, Flask, and Flask_SocketIO in Windows. Everything works fine from the command line, but when I try to bundle my API into an .exe using cx_Freeze and then run it, I get the error: ValueError: Invalid async_mode…
Brian
  • 5,826
  • 11
  • 60
  • 82
5
votes
1 answer

Gevent/Gevent-websocket not being used by Flask-SocketIO

I am building a web interface/data API using Flask and Flask-SocketIO for websocket communication. I would like to start shifting to a more development-ready setup using Gevent/Gevent-websocket, Gunicorn, and eventually Nginx for load balancing. …
Evan McCoy
  • 115
  • 2
  • 8
5
votes
1 answer

Flask Restful and Flask SocketIO server run together

I'm trying to use Flask Restful and Flask SocketIO at the same time. I already made a Flask Restful application but now I want to use Flask SocketIO to have realtime communication between client and my server. from flask import Flask from…
5
votes
1 answer

How to send messages to all clients with Flask-SocketIO?

I'm trying to learn Flask-SocketIO, Now i'm trying to do simple chat, but no one receives messages except the user in browser. Python/Flask code: from flask import Flask, render_template from flask_socketio import SocketIO, emit app =…
suayip uzulmez
  • 628
  • 8
  • 23
5
votes
2 answers

Mixed content: page at https was loaded over https but requested an insecure

I'm using Nginx + flask-socketio + aws elb and when the URL is loaded on https I'm getting the following error message which is something related to the Nginx and socket, please help on this, socket.io.min.js:2 Mixed Content: The page at…
IAmHomes
  • 513
  • 2
  • 11
  • 20
5
votes
1 answer

Why does this decrease the audio quality?

I am streaming audio in my flask app from a client to the server, but the received audio has very low quality. On the client, I preprocess the audio buffer as follows: this.node.onaudioprocess = function(e){ var buf =…
user2212461
  • 3,105
  • 8
  • 49
  • 87