Class MulticastGroup

    • Method Detail

      • getIf

        public NetworkInterface getIf()
        Returns:
        network interface for this MulticastGroup
      • getGroup

        public InetSocketAddress getGroup()
        Returns:
        group (IP group and port number) which messages will be received by this MulticastGroup
      • getBufferSize

        public int getBufferSize()
        Returns:
        recommended UDP packet buffer size. a real size can be bigger.
      • onReceive

        public void onReceive​(byte[] data,
                              int size)
        Internal use only.

        onReceive will be called from Connection when its receives a new UDP multicast packet

        Parameters:
        data - array that contains UDP packet
        size - size of the packet. should be less than data.length
      • getOwner

        public MulticastReceiver getOwner()
        returns null if the MulticastGroup is detached (dropped)
        Returns:
        owner of this feed.
      • close

        public void close()
        Detaches this feed from MulticastReceiver.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable