python - Is windows's setsockopt broken? -
I want to be able to reuse some ports, and that's why I use setockopt My socket is using, with the following code:
sock.setsockopt (socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) However, this Actually not work. I'm not getting any bind error, but the server socket is not just responding (it is starting, but if I try to connect it, this selection does not enter the loop). This behavior appears when the script ends unexpectedly, and if the port is listening to the server then the port changes, then everything works again can you provide some advice?
EDIT: I changed the name of the socket. It was just a name that I chose for this code snippet.
It appears that SO_REUSEADDR has different terms on Windows
refer to it ( Especially below the chart "Using SO_EXCLUSIVEADDRUSE") and.
Also see this, this list of these differences and this.
/ div>