<div dir="ltr"><br><br><div class="gmail_quote">On Sat, May 23, 2015 at 6:50 PM pablo platt <<a href="mailto:pablo.platt@gmail.com">pablo.platt@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span>From the stackoverflow link, SO_REUSEADDR let you use the same source address when a previous socket is closing (TIME_WAIT).<br></span><span>SO_REUSEPORT let you use the same source address and port as long as the socket tuple is different.<br>{<protocol>, <src addr>, <src port>, <dest addr>, <dest port>}<br></span></div><span>On some systems </span><span>(Linux =< 3.9, Windos) SO_REUSEADDR is the same as the combination of </span><span>SO_REUSEADDR and </span><span>SO_REUSEPORT.</span><div><span><br>It seems that Linux and BSD use a slightly different raw setting for </span><span><span>SO_REUSEPORT</span>:<br><a href="https://github.com/aetrion/erl-dns/commit/0c8d768ae69773d2163ea0741125471983b9a57d#diff-06495a7d8430a91558d99be5f1209c32R83" target="_blank">https://github.com/aetrion/erl-dns/commit/0c8d768ae69773d2163ea0741125471983b9a57d#diff-06495a7d8430a91558d99be5f1209c32R83</a><br>[{<span>raw</span>, <span>1</span>, <span>15</span>, <<<span>1</span>:<span>32</span>/<span>native</span>>>}];<br><br></span></div><div><span>How can I build a UDP server that listen on a fixed {Addr, Port} and creates a new process for a new client connection?<br></span></div><div><span>Does this suppose to work?<br></span></div></div></blockquote><div><br></div><div>Of course it is:</div><div><a href="https://github.com/refuge/rbeacon/blob/master/src/rbeacon.erl#L564-L599">https://github.com/refuge/rbeacon/blob/master/src/rbeacon.erl#L564-L599</a><br></div><div> </div><div>- benoit</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
</blockquote></div></div>