|
|
| Author |
Message |
|
| yann |
Posted: Tue May 29, 2012 5:19 am |
|
|
|
Joined: 24 May 2012
Posts: 2
|
Hi.
I used multicast(ipv4) by erlang, my code is below.
gen_udp:open(?MULTICAST_PORT, [binary, {reuseaddr, true}, {ip, ?MULTICAST_ADDR}, {add_membership, {?MULTICAST_ADDR, Address}}, multicast_ttl, ?MULTICAST_TTL}]).
?MULTICAST_ADDR and Address is both ipv4 address.
It is working good.
and now, I will use multicast by ipv6,
but above sentence is not work. (I changed the above address to ipv6 address)
this is the error code: {error,badarg}.
so, I saw the source, and follow the inet.erl -> prim_inet.erl.
and, I founded that the function prim_inet:is_sockopt_val() is not work. (error is caused "add_membership" option)
there is a code in prim_inet.erl:
type_value_2(ip,{A,B,C,D}) when ?ip(A,B,C,D) -> true;
but I think we need a code like this:
type_value_2(ip, {A,B,C,D,E,F,G,H}) when ?ip6(...) -> true;
Do you have any experience using ipv6 multicast?
How can I use erlang for this case?
Thank you for your reply. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|