Interface IMulticastReceiver

    • Method Detail

      • join

        MulticastGroup join​(String groupId,
                            int port,
                            NetworkInterface nif,
                            MulticastListener listener)

        Short version of join with default buffer size

        This method is equivalent to:

         
         join(groupId, port, nif, listener, MulticastReceiver.PACKET_MAXSIZE);
         
         
        Parameters:
        groupId - a multicast address to join
        port - port number where to receive UDP packets
        nif - The network interface on which to join the group
        listener - of the MulticastGroup events.
        Returns:
        created MulticastGroup
      • join

        MulticastGroup join​(String groupId,
                            int port,
                            NetworkInterface nif,
                            MulticastListener listener,
                            int bufferSize)
        Creates a feed and send a join request.
        Parameters:
        groupId - a multicast address to join
        port - port number where to receive UDP packets
        nif - The network interface on which to join the group
        listener - listener of the MulticastGroup events.
        bufferSize - max packet size for this multicast group
        Returns:
        created MulticastGroup
      • join

        MulticastGroup join​(InetSocketAddress group,
                            NetworkInterface nif,
                            MulticastListener listener,
                            int bufferSize)
        Creates a feed and send a join request.
        Parameters:
        group - a multicast address to join with UDP port Number
        nif - The network interface on which to join the group
        listener - of the MulticastGroup events.
        bufferSize - buffer size for UDP packets of the corresponded group
        Returns:
        created MulticastGroup to receive multicast group messages
      • join

        MulticastGroup join​(InetSocketAddress group,
                            NetworkInterface nif,
                            MulticastListener listener)

        Short version of join with default buffer size

        This method is equivalent to:

         
         join(group, nif, listener, MulticastReceiver.PACKET_MAXSIZE);
         
         
        Creates a feed and send a join request.
        Parameters:
        group - a multicast address to join with UDP port Number
        nif - The network interface on which to join the group
        listener - of the MulticastGroup events.
        Returns:
        created MulticastGroup to receive multicast group messages
      • drop

        void drop​(MulticastGroup feed)
        Drops (and closes) attached feed. If feed doesn't belong to this Receiver, it will not be dropped.
        Parameters:
        feed - feed to drop from receiving multicast
      • step

        boolean step()
        process one step of receiving. It's: 1. Adds all feeds added by join function 2. Drops/removes feeds from drop list 3. Proceeds all opened connections
        Returns:
        false if MulticastReceiver cannot work farther and must be closed, true if everything going well