MulticastChannel

public protocol MulticastChannel : Channel

A MulticastChannel is a Channel that supports IP multicast operations: that is, a channel that can join multicast groups.

Note

As with Channel, all operations on a MulticastChannel are thread-safe.
  • joinGroup(_:promise:) Default implementation

    Request that the MulticastChannel join the multicast group given by group.

    Default Implementation

    Declaration

    Swift

    func joinGroup(_ group: SocketAddress, promise: EventLoopPromise<Void>?)

    Parameters

    group

    The IP address corresponding to the relevant multicast group.

    promise

    The EventLoopPromise that will be notified once the operation is complete, or nil if you are not interested in the result of the operation.

  • Request that the MulticastChannel join the multicast group given by group on the interface given by interface.

    Declaration

    Swift

    func joinGroup(_ group: SocketAddress, interface: NIONetworkInterface?, promise: EventLoopPromise<Void>?)

    Parameters

    group

    The IP address corresponding to the relevant multicast group.

    interface

    The interface on which to join the given group, or nil to allow the kernel to choose.

    promise

    The EventLoopPromise that will be notified once the operation is complete, or nil if you are not interested in the result of the operation.

  • leaveGroup(_:promise:) Default implementation

    Request that the MulticastChannel leave the multicast group given by group.

    Default Implementation

    Declaration

    Swift

    func leaveGroup(_ group: SocketAddress, promise: EventLoopPromise<Void>?)

    Parameters

    group

    The IP address corresponding to the relevant multicast group.

    promise

    The EventLoopPromise that will be notified once the operation is complete, or nil if you are not interested in the result of the operation.

  • Request that the MulticastChannel leave the multicast group given by group on the interface given by interface.

    Declaration

    Swift

    func leaveGroup(_ group: SocketAddress, interface: NIONetworkInterface?, promise: EventLoopPromise<Void>?)

    Parameters

    group

    The IP address corresponding to the relevant multicast group.

    interface

    The interface on which to leave the given group, or nil to allow the kernel to choose.

    promise

    The EventLoopPromise that will be notified once the operation is complete, or nil if you are not interested in the result of the operation.