SO_REUSEPORT and gen_tcp

Andrew Lentvorski bsder@REDACTED
Sat May 20 12:00:14 CEST 2006


Can someone help me out?  I seem to be missing the function which would 
allow me to set the SO_REUSEPORT flag in gen_tcp.

I see the:

{reuseaddr, Boolean}
     Allows or disallows local reuse of port numbers. By default, reuse 
is disallowed.

line.  But no matching {reuseport, Boolean}.

Alternatively, if this is an intentional omission, could someone please 
explain why?

The reason I want to use this is so that I can create an incoming and an 
outgoing TCP connection on the same port.  To forestall the inevitable 
"you can't do this" or "you don't want to do this", see:
http://www.brynosaurus.com/pub/net/p2pnat.pdf

for an explanation of how to use SO_REUSEPORT for the purposes of NAT 
hole punching via TCP to establish true peer-to-peer connections from 
behind network address translators.

Thanks,
-a




More information about the erlang-questions mailing list