Ask coding questions

← Back to all posts
How to connect two repls via websockets in PYTHON?
Redhawk405

Can someone please give me the two things I have been looking for for over a year?

1) A WORKING websocket server code example (in python) that other repls can connect to. It can be as simple as returning a number.

2) A WORKING websocket client code example to recieve the data that would work in repl.

I tried to build a game a while back, but it failed. I would like to rebuild it in real-time mmo, but I need the above to do so.

If you can help, it will be much appreciated!

Voters
Redhawk405
Comments
hotnewtop
SixBeeps

Do you want to work with raw websockets, or would you mind using a library such as socketio? Also, will your game be a web application or a standalone program?

Redhawk405

@SixBeeps Hey there!
I would prefer raw websockets and as a standalone, if possible.

Redhawk405

@SixBeeps Are you able to help with that? No pressure.

SixBeeps

@Redhawk405 I've never worked with raw websockets before, but I could give it a stab sometime tonight (EST) if nobody else can help by then.

Redhawk405

@SixBeeps OK. Thanks!

Redhawk405

@SixBeeps Did you get to it last night?