Package arc.net
Interface ClientDiscoveryHandler
public interface ClientDiscoveryHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoiddiscoveredHost(DatagramPacket datagramPacket) Called when theClientdiscovers a host.voidfinish()Called right before theClient#discoverHost(int, int)orClient#discoverHosts(int, int)method exits.Implementations of this method should return a newDatagramPacketthat theClientwill use to fill with the incoming packet data sent by theServerDiscoveryHandler.
-
Method Details
-
newDatagramPacket
DatagramPacket newDatagramPacket()Implementations of this method should return a newDatagramPacketthat theClientwill use to fill with the incoming packet data sent by theServerDiscoveryHandler.- Returns:
- a new
DatagramPacket
-
discoveredHost
Called when theClientdiscovers a host.- Parameters:
datagramPacket- the sameDatagramPacketfromnewDatagramPacket(), after being filled with the incoming packet data.
-
finish
void finish()Called right before theClient#discoverHost(int, int)orClient#discoverHosts(int, int)method exits. This allows the implementation to clean up any resources used.
-