Example usage for io.netty.channel.socket.nio NioDatagramChannel leaveGroup

List of usage examples for io.netty.channel.socket.nio NioDatagramChannel leaveGroup

Introduction

In this page you can find the example usage for io.netty.channel.socket.nio NioDatagramChannel leaveGroup.

Prototype

@Override
    public ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface) 

Source Link

Usage

From source file:com.barchart.netty.server.stream.MulticastTransceiver.java

License:BSD License

@Override
public Future<MulticastTransceiver> shutdown() {

    for (final Channel c : serverChannels) {

        final NioDatagramChannel dc = (NioDatagramChannel) c;

        final InetSocketAddress multicast = dc.remoteAddress();

        dc.leaveGroup(multicast, dc.config().getOption(ChannelOption.IP_MULTICAST_IF));

    }//from  ww  w .  j a  va 2  s . com

    return super.shutdown();

}