Is it possible in TCP for different processes not sharing the same executable image (so no fork()
for example) to use a same client-side port on Windows, Linux or OSX? This is specifically related to the socket options SO_REUSEADDR
and SO_REUSEPORT
set using setsockopt()
I believe.
As far as I've read, I believe it is possible for the same process/image to do this, but I haven't found information as to multiple processes/images. I would imagine it is theoretically possible since each socket is defined by the 5-valued tuple [IP_PROTO, src_ip:src_port, dst_ip:dst_port]. So I would assume that, as long as multiple TCP connections sharing a client-side port are not made to the same dst_ip:dst_port, this would be theoretically possible.