I am testing my server and client with two computers.
This is my server:
This is my server:
import socket
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(('localhost', 9090))
server.listen(1)
copp, adr = server.accept()
while True:
letter = copp.recv(2000)
print(str(letter))
copp.send(b'asd')
this is my client:
import socket
client = socket.socket()
client.connect(('localhost', 9090))
client.send(b'Yes')And this is my problem:Error:Traceback (most recent call last):
File "C:\Users\Владелец\Desktop\Yes.py", line 3, in <module>
client.connect(('localhost', 9090))
ConnectionRefusedError: [WinError 10061] The connection is not established, since target computer rejected the connection request
