[erlang-questions] udp multicast: problem with OSX?
Radoslaw Gruchalski
radek@REDACTED
Tue Apr 12 18:04:40 CEST 2016
Peter,
I will have a look at the compilation problems before the end of this working week.
Sent from Outlook Mobile
On Tue, Apr 12, 2016 at 8:48 AM -0700, "Peter Morgan" <peter.james.morgan@REDACTED> wrote:
Hi Radek,
Thanks - Yes, I have had multicast working previously on OSX and Linux way back somewhere in 2011 with https://github.com/shortishly/mdns.
I had some trouble compiling gossiperl - I tried with R18 but the rebar.config needed R17, when I tried with R17 one of the dependencies required R18. Do you have another branch that I missed?
My issue seems to be that I can receive multicast on OSX, but I cannot send…
ThanksPeter.
On 7 Apr 2016, at 15:39, Rad Gruchalski <radek@REDACTED> wrote:
Hi Peter,
Multicast works absolutely fine on OSX. Here is how multicast is enabled:https://github.com/gossiperl/gossiperl/wiki/multicast-overlays#setting-up-multicast-on-os-x
And then using the multicast options:https://github.com/gossiperl/gossiperl/blob/master/include/gossiperl.hrl#L107
Works perfect on Linux, OSX and RPi.
Best regards,
Radek
Gruchalski
radek@REDACTED
de.linkedin.com/in/radgruchalski/
Confidentiality:
This
communication is intended for the above-named person and may be
confidential and/or legally privileged.
If it has come to you in
error you must take no action based on it, nor must you copy or show
it to anyone; please delete/destroy and inform the sender
immediately.
On Thursday, 7 April 2016 at 16:14, Peter Morgan wrote:
Hello -
I’m having some trouble getting UDP multicast working on OSX, whereas the same code on Linux works fine.
On linux (fedora 23):
[pmorgan@REDACTED ~]$ erlErlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.3 (abort with ^G)1> Address = {224, 0, 0, 251}.{224,0,0,251}2> Port = 5353.53533> {ok, Socket} = gen_udp:open(Port, [binary, {ip, Address}, {add_membership, {Address, {0,0,0,0}}}, {reuseaddr, true}]).{ok,#Port<0.543>}4> gen_udp:send(Socket, Address, Port, <<"hello world">>).ok
Whereas on OSX:
Office-iMac:mdns pmorgan$ sw_vers ProductName: Mac OS XProductVersion: 10.11.4BuildVersion: 15E61b
Office-iMac:mdns pmorgan$ erlErlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V7.3 (abort with ^G)1> Address = {224, 0, 0, 251}.{224,0,0,251}2> Port = 5353.53533> {ok, Socket} = gen_udp:open(Port, [binary, {ip, Address}, {add_membership, {Address, {0,0,0,0}}}, {reuseaddr, true}]).{ok,#Port<0.553>}4> gen_udp:send(Socket, Address, Port, <<"hello world">>).{error,eaddrnotavail}
I’ve tried various other options in gen_udp:open/2, but not found a combination that works for OSX. Any ideas please? The above is a simplified test case of https://github.com/shortishly/mdns/blob/master/src/mdns_udp.erl#L41-L49
Thanks,Peter.
_______________________________________________erlang-questions mailing listerlang-questions@REDACTED://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160412/56a62136/attachment.htm>
More information about the erlang-questions
mailing list