ik heb deze code
import socket
sock = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', 2727))
sock.send('hello guy')
sock.recv(100)
sock.close()
als ik dit uitvoer krijg ik deze error
Traceback (most recent call last):
File "/home/jeremy/Bureaublad/sock.py", line 4, in <module>
sock.connect(('localhost', 2727))
File "<string>", line 1, in connect
error: (111, 'Connection refused')
ik denk dat het komt omdat de poort dicht is en het programma geen toegang krijgt
maar weet het niet zeker.