Multicast UDP sending question
Matthew Palmer
mpalmer@REDACTED
Tue Nov 17 20:35:20 CET 2009
On Tue, Nov 17, 2009 at 07:09:59PM +0100, Tony Rogvall wrote:
> Try the reuse port option? pass it to inet:setopts or gen_udp:open.
>
> You have to craft it a bit your self.
>
> reuse_port() ->
> [{raw,?SOL_SOCKET,?SO_REUSEPORT,<<1:32/native>>}].
>
>
> where
>
> -define(SOL_SOCKET, 16#ffff).
>
> and
>
> %% enables duplicate address and port bindings
> -define(SO_REUSEPORT, 16#0200).
>
> This is tested on mac os x 10.4/10.5/10.6
>
> Maybe it's the same in linux?
My Debian lenny system has that constant commented out, sounds like it's a
work in progress:
[...]
#define SO_LINGER 13
#define SO_BSDCOMPAT 14
/* To add :#define SO_REUSEPORT 15 */
#define SO_PASSCRED 16
#define SO_PEERCRED 17
[...]
- Matt
More information about the erlang-questions
mailing list