Client cannot connect to server [Errno 111]

How do I made replit accept the client’s connection? Replits throws an error.
Repl link: server client

Traceback (most recent call last):
  File "", line 7, in <module>
    client_socket.connect(('localhost', 3496))
ConnectionRefusedError: [Errno 111] Connection refused

you are connecting to localhost. Remember that’s from a tutorial where they aren’t hosting it on the web. Change it so that the server is running on host and client is going to repl_url also I’d use websockets

i didnt use a tutorial, thank you however

1 Like

oh ok didn’t realize lol

what do i replace portnum with
server_socket.bind(('', portnum))

1 Like

8080 also I would use websockets…

Yes, I will try with websockets l8r. Says 8080 is already in use.

Traceback (most recent call last):
  File "", line 9, in <module>
    server_socket.bind(('', 8080))
OSError: [Errno 98] Address already in use
1 Like

interesting I don’t know I just use websockets

i got it to work with 8081, but i put instead of for the client and it says it doesnt recognize it

1 Like

do you know what i should do

1 Like