Socket.io python server

I am using https://github.com/invisibleroads/socketIO-client so that my Node.JS server is communicating with Python Backend.

However, this is a bit complicated because I really want to use my Python as a backend, and it makes sense to use Python as a server, and Node.JS acts as a client. Ideally, Node.JS code initiates a connection to Python code, and Python code returns something.

Although there is a socket.io-client library for Node.JS, I could not find a simple socket.io server library for Python.

As an alternative, how can I get socket.io server to initiate a message (i.e. emit ()) to the client?

+6
source share
2 answers

Oops, after reading the bottom of https://github.com/learnboost/socket.io/wiki , it shows that

http://github.com/abourget/gevent-socketio

does the trick. There is also a library https://github.com/evanw/socket.io-python , which is deprecated due to an obsolete socket.io

+8
source

gevent-socketio is no longer supported (last commit, January 2014).

New Flask-SocketIO Player :

+1
source

Source: https://habr.com/ru/post/925256/


All Articles