Checking refusal of a network connection
Markus Elfring
Markus.Elfring at web.de
Sat Jun 1 13:15:28 EDT 2019
>> connect(3, {sa_family=AF_INET, sin_port=htons(37351), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
>
> Without seeing the code, I'd be suspicious of that difference.
I would expect that the IPv4 address from such a connection attempt
would be automatically converted to a IPv6 loopback address.
Unfortunately, the direct specification “… socket-send_json_data.py --server_id ::1 …”
does not work at the moment because of the error message “socket.gaierror: [Errno -9]
Address family for hostname not supported”.
Regards,
Markus
More information about the Python-list
mailing list