Package arc.net
Interface ClientDiscoveryHandler
public interface ClientDiscoveryHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoid
discoveredHost
(DatagramPacket datagramPacket) Called when theClient
discovers a host.void
finish()
Called right before theClient#discoverHost(int, int)
orClient#discoverHosts(int, int)
method exits.Implementations of this method should return a newDatagramPacket
that theClient
will use to fill with the incoming packet data sent by theServerDiscoveryHandler
.
-
Method Details
-
newDatagramPacket
DatagramPacket newDatagramPacket()Implementations of this method should return a newDatagramPacket
that theClient
will use to fill with the incoming packet data sent by theServerDiscoveryHandler
.- Returns:
- a new
DatagramPacket
-
discoveredHost
Called when theClient
discovers a host.- Parameters:
datagramPacket
- the sameDatagramPacket
fromnewDatagramPacket()
, 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.
-