Package arc.net

Interface ClientDiscoveryHandler


public interface ClientDiscoveryHandler
  • Method Details

    • newDatagramPacket

      DatagramPacket newDatagramPacket()
      Implementations of this method should return a new DatagramPacket that the Client will use to fill with the incoming packet data sent by the ServerDiscoveryHandler.
      Returns:
      a new DatagramPacket
    • discoveredHost

      void discoveredHost(DatagramPacket datagramPacket)
      Called when the Client discovers a host.
      Parameters:
      datagramPacket - the same DatagramPacket from newDatagramPacket(), after being filled with the incoming packet data.
    • finish

      void finish()
      Called right before the Client#discoverHost(int, int) or Client#discoverHosts(int, int) method exits. This allows the implementation to clean up any resources used.