@dgelessus Hi.
Thank you for your reply. Your answer solved my problem.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by MrMyrmex
-
RE: Help: "ConnectionRefusedError: [Errno 61] Connection refused"
-
Help: "ConnectionRefusedError: [Errno 61] Connection refused"
Hi.
Everytime on run this TCP Client script on my iPhone i get the error message from the title. Any ideas why? The script works fine on Windows.
import socket TCP_IP = '127.0.0.1' TCP_PORT = 5005 BUFFER_SIZE = 1024 MESSAGE = "Hello, World" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP,TCP_PORT)) s.send(MESSAGE.encode('utf-8')) data = s.recv(BUFFER_SIZE) s.close() print("recived data: ", data.decode('utf-8'))
BTW! I'm executing it with Python 3.6.