Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
refused connection
#2
The server should not call s.connect((host, port)) but s.bind((host, port)).

Also I recommend that before calling bind() the server configures the socket with
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
this is useful if you start the server several times and you don't want to receive the error address already in use.
Reply


Messages In This Thread
refused connection - by mcgrim - Nov-02-2019, 10:52 PM
RE: refused connection - by Gribouillis - Nov-03-2019, 12:16 AM
RE: refused connection - by mcgrim - Nov-03-2019, 09:40 AM
RE: refused connection - by Gribouillis - Nov-03-2019, 09:51 AM
RE: refused connection - by mcgrim - Nov-03-2019, 10:13 AM
RE: refused connection - by Gribouillis - Nov-03-2019, 11:07 AM
RE: refused connection - by mcgrim - Nov-04-2019, 11:16 AM
RE: refused connection - by Gribouillis - Nov-04-2019, 11:45 AM
RE: refused connection - by mcgrim - Nov-04-2019, 11:56 AM
RE: refused connection - by Gribouillis - Nov-04-2019, 12:30 PM
RE: refused connection - by mcgrim - Nov-04-2019, 12:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Machine actively refused it. External IP only ramboahoe 1 3,445 Mar-28-2020, 12:46 AM
Last Post: ramboahoe
  No connection could be made becouse the target machine actively refused it. GottaAimHigherPal 1 2,794 Oct-18-2018, 01:59 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020