Socket.joinMulticastGroup

Registers socket to receive multicast messages sent to group. socket must be a G_SOCKET_TYPE_DATAGRAM socket, and must have been bound to an appropriate interface and port with Socket.bind.

If iface is NULL, the system will automatically pick an interface to bind to based on group.

If source_specific is TRUE, source-specific multicast as defined in RFC 4604 is used. Note that on older platforms this may fail with a G_IO_ERROR_NOT_SUPPORTED error.

To bind to a given source-specific multicast address, use Socket.joinMulticastGroupSsm instead.

class Socket
bool
joinMulticastGroup

Parameters

group InetAddress

a gio.InetAddress specifying the group address to join.

sourceSpecific bool

TRUE if source-specific multicast should be used

iface string

Name of the interface to use, or NULL

Return Value

Type: bool

TRUE on success, FALSE on error.

Throws

GException on failure.

Meta

Since

2.32