Code example for MulticastSocket

Methods: setBroadcastsetSoTimeout

0
            ChannelSink sink) {
 
        super(null, factory, pipeline, sink);
 
        try { 
            socket = new MulticastSocket(null);
        } catch (IOException e) {
            throw new ChannelException("Failed to open a datagram socket.", e);
        } 
 
        try { 
            socket.setSoTimeout(10);
            socket.setBroadcast(false);
        } catch (SocketException e) {
            throw new ChannelException( 
                    "Failed to configure the datagram socket timeout.", e);
        } 
        config = new DefaultDatagramChannelConfig(socket);
 
        fireChannelOpen(this);
Stop searching for code, let great code find you!  Add Codota to your java IDE