Issue with p2p networking with websockets

Joined
Jan 4, 2025
Messages
1
Reaction score
0
I'm making a LAN multiplayer word/trivia game for a computing project. I'm trying to code a module network.py, the aim of which is to broadcast messages, wait for a response, and if there are no responses, become the host, so when more computers run the code, they join the host and are able to transmit messages afterwards. I don't have much coding experience, and I've encountered an issue which I don't know how to overcome. Whenever a second player tries to join the host there is an error. I've attached screenshots of the code and output. I'm not sure how to fix and any help would be greatly appreciated.

1735998660998.png

1735998674470.png

1735998705921.png

1735998729885.png

1735998745589.png


1735998777314.png


1735998802517.png

1735998816126.png

code screenshot.png
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,129
Messages
2,570,770
Members
47,328
Latest member
RoxieXru93

Latest Threads

Top