Code example for DatagramSocket

Methods: getBroadcast

0
        return true; 
    } 
 
    public boolean isBroadcast() { 
        try { 
            return socket.getBroadcast();
        } catch (SocketException e) {
            throw new ChannelException(e);
        } 
    } 
 
    public void setBroadcast(boolean broadcast) {
        try { 
            socket.setBroadcast(broadcast);
        } catch (SocketException e) {
            throw new ChannelException(e);
        } 
    } 
 
    public InetAddress getInterface() {
        if (socket instanceof MulticastSocket) {