Questions tagged [python-socketio]

Python implementation of the Socket.IO realtime client and server.

205 questions
0
votes
2 answers

python-socketio client to client messaging

Can I send messages from one client directly to another using python-socketio? It can be done using socketio as follows: socket.join('room') io.sockets.in('room').emit('event_name', data) Source: socket.io client to client messaging I can't find…
XDGFX
  • 41
  • 2
  • 9
0
votes
2 answers

while loop in socket io

hii i am trying to bulid client with socketio python. how can i break the loop when I catch an event def login(): index = 0 while index == 0: username = input("please enter your username\n") password = input("please enter your…
0
votes
1 answer

python socket-io emit() doesn't send time until after execution

Using the python socketio package, I created a timer that starts when a client connects to my server. Server-side code: import socketio sio = socketio.Server() app = socketio.WSGIApp(sio, static_files={ '/': './public/' }) @sio.event def…
Harry
  • 3
  • 1
0
votes
1 answer

How do you prevent an instance using a socketio.AsyncClient code from blocking?

I am struggling with the following piece of code. Once instantiated, it is intended to be a component of a containing object. In my mind the containing object should be able to instantiate multiple Connectors, all using the same default asyncio…
manu3d
  • 991
  • 1
  • 8
  • 23
0
votes
0 answers

How to create a dynamic flowchart using python and socketio in python to track code running process?

So the goal is to monitor our code running procedure. For example, in our codes, we have step 1 loading the data, step 2 processing the data, step3... We want to plot out this procedure in flowchart on a web page. But at the same time we want the…
0
votes
1 answer

How do I stop flask_socketio setting SO_REUSEPORT?

If I do this, then port 8080 will be exclusively bound and trying to run another instance will fail: from flask import Flask flask_app = Flask(__name__) flask_app.run(port=8080) If I do this, then the SO_REUSEPORT socket option is set, which means…
Michael
  • 3,639
  • 14
  • 29
0
votes
0 answers

How do I get the return values from python-socketio to PYQT5

How can I get the return value from socketio (python-socketio-version=4.5) in another Python script? Tried a global variable. Tried to call the Update function in another script. ->My goal is to pass the return value "data" to my GUI with…
Robin Fauser
  • 111
  • 1
  • 13
0
votes
0 answers

python socketio Server with custom mainloop

simplified use case I have multiple (slow) robots, an API for the robots to upload sensor data and one control loop for all robots running on the server. The setup that I want to create looks something like this: Robot emits event with new sensor…
frameworker
  • 378
  • 3
  • 13
0
votes
1 answer

How to disconnect on a custom event python-socketio

I have the 2 handlers: @sio.event async def connect(sid, environ): print('connect', sid) @sio.event async def disconnect(sid, environ): # perform some user management stuff # perform some cleaning as well print('disconnect',…
Luc Bertin
  • 326
  • 1
  • 12
0
votes
1 answer

Python SocketIO Connect

Please help me in creating a client instance using socketio package: socketio.AsyncClient() with details below: import socketio import asyncio sio = socketio.AsyncClient(logger=False, engineio_logger=False) I need help regarding the passing of…
0
votes
1 answer

How can a user request something new while a retraining process still takes places using fastapi-socketio and python asyncio?

Does anyone have an idea for the following problem? Using the frontend, the user should be able to send a request to retrain a machine learning model. While the retraining is taking place, the user should still be able to get predictions from the…
yellow
  • 41
  • 4
0
votes
1 answer

Python-socketio not emitting events sometimes on FastAPI Heroku server

I have a FastAPI server running on Heroku, using python-socketio(5.3.0) to handle socket connections. I have an endpoint that is called when an event needs to be emitted to a certain socket. The problem I am facing is that the event doesn't emit…
0
votes
1 answer

Which version of socketio java client is compatible with which version of flask-socketio server?

I couldn't understand which version of socketio-java-client is compatible with flask-socketio server. Whether I have to check the version of socketio-java-client version with the flask-socketio or python-socketio or to the python-engineio versions?
0
votes
1 answer

Sending data generated from a seperate python program to socketIO clients with a socketIO server

I currently have a socketio webserver using WSGI and I host it with gunicorn. I also have set up a javascript client which uses a web browser. I've managed to get these two to be able to communicate. I'm working on creating an information service…
0
votes
1 answer

Print python-socketio events infos using decorators

I would like to improve the socketio.event decorator to make it print the event fired and its parameters. I have a Manager class which has a self.sio: socketio.Server attribute. I try to define a new decorator as a Manager method such as it returns…
Kahsius
  • 747
  • 2
  • 7
  • 18