Flask-socketio: Pure Python client with Flask-SocketIO

Created on 14 Jun 2016  路  6Comments  路  Source: miguelgrinberg/Flask-SocketIO

Im following your tutorial, I cloned your repo and have the websocket server up and running, however I intend to build a the websocket client with python instead of javascript using this library websocket-client. Here's the client file (client)[https://github.com/Pr0x1m4/infosetd/blob/master/infosetd.py].

I can't seem to get the connection to work, whenever I run the client, I get this output
2016-06-14-133122_1920x1080_scrot

My question would then be can these two libraries work together or what am I doing wrong?

invalid

Most helpful comment

the problem is Google. I was searching flask websocket and got the link to this repo on the first page of results. But this project is not about WEBSOCKET, it works just with socket.io...

Also, I found kennethreitz/flask-sockets#1 - it works good with pure WebSocket.

May be it makes sense to add the line this project DO NOT work with pure WebSocket to the top of README.md file???

ping, @miguelgrinberg

All 6 comments

Flask-SocketIO is not a WebSocket server, it is a Socket.IO server. The client that you need to use needs to understand the Socket.IO protocol, a WebSocket client alone is not enough.

Oh okay, much appreciated, thanks for clarification.

@Pr0x1m4 You might try this: https://pypi.python.org/pypi/socketIO-client

the problem is Google. I was searching flask websocket and got the link to this repo on the first page of results. But this project is not about WEBSOCKET, it works just with socket.io...

Also, I found kennethreitz/flask-sockets#1 - it works good with pure WebSocket.

May be it makes sense to add the line this project DO NOT work with pure WebSocket to the top of README.md file???

ping, @miguelgrinberg

please how can i create a pure python client

@MrJaysa You can use this client: https://pypi.org/project/socketIO-client/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nh916 picture nh916  路  3Comments

blstdmi picture blstdmi  路  3Comments

piyush121 picture piyush121  路  3Comments

thehelpfulbees picture thehelpfulbees  路  4Comments

EndenDragon picture EndenDragon  路  3Comments