Code example for MulticastSocket

Methods: isBoundjoinGroup

0
        } 
        return remoteAddress;
    } 
 
    public boolean isBound() { 
        return isOpen() && socket.isBound();
    } 
 
    public boolean isConnected() { 
        return isOpen() && socket.isConnected();
    } 
 
    @Override 
    protected boolean setClosed() { 
        return super.setClosed(); 
    } 
 
    @Override 
    protected void setInterestOpsNow(int interestOps) {
        super.setInterestOpsNow(interestOps);
    } 
 
    @Override 
    public ChannelFuture write(Object message, SocketAddress remoteAddress) {
        if (remoteAddress == null || remoteAddress.equals(getRemoteAddress())) {
            return super.write(message, null);
        } else { 
            return super.write(message, remoteAddress);
        } 
    } 
 
    public void joinGroup(InetAddress multicastAddress) {
        ensureBound(); 
        try { 
            socket.joinGroup(multicastAddress);
        } catch (IOException e) {
            throw new ChannelException(e);
        } 
    } 
 
    public void joinGroup( 
            InetSocketAddress multicastAddress, NetworkInterface networkInterface) {
        ensureBound(); 
        try { 
            socket.joinGroup(multicastAddress, networkInterface);
        } catch (IOException e) {
            throw new ChannelException(e);
        } 
    }