Python Socket in Replit
I tried making a socket program, but I can't seem to get my client to connect to the server. I did some research and found another post that suggested changing the host to "0.0.0.0", but now when I run my client code, it gives the following error:
Traceback (most recent call last):
File "main.py", line 11, in <module>
ConnectionRefusedError: [Errno 111] Connection refused
How do I fix this?
As far as I know, sockets do not work in python on replit, due to the fact that it thinks it supposed to create an HTTP server or something like that. You can however use socket.io in Node.js, if you still want to host it on replit.