Method _Stdio.UDP()->add_membership()


Method add_membership

int add_membership(string group, void|string address)

Description

Join a multicast group.

Parameter group

group contains the address of the multicast group the application wants to join. It must be a valid multicast address.

Parameter address

address is the address of the local interface with which the system should join to the multicast group. If not provided the system will select an appropriate interface.

See also the Unix man page for setsocketopt IPPROTO_IP IP_ADD_MEMBERSHIP and IPPROTO_IPV6 IPV6_JOIN_GROUP.

Note

The address parameter is currently not supported for IPv6.

Note

This function did not support IPv6 in Pike 7.8 and earlier.

See also

drop_membership()