public interface ClientDiscoveryHandler
| Modifier and Type | Field and Description |
|---|---|
static ClientDiscoveryHandler |
DEFAULT
This implementation of the
ClientDiscoveryHandler is responsible
for providing the Client with it's default behavior. |
| Modifier and Type | Method and Description |
|---|---|
void |
onDiscoveredHost(DatagramPacket datagramPacket,
com.esotericsoftware.kryo.Kryo kryo)
Called when the
Client discovers a host. |
void |
onFinally()
Called right before the
Client.discoverHost(int, int) or
Client.discoverHosts(int, int) method exits. |
DatagramPacket |
onRequestNewDatagramPacket()
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. |
static final ClientDiscoveryHandler DEFAULT
ClientDiscoveryHandler is responsible
for providing the Client with it's default behavior.DatagramPacket onRequestNewDatagramPacket()
DatagramPacket
that the Client will use to fill with the incoming packet data
sent by the ServerDiscoveryHandler.DatagramPacketvoid onDiscoveredHost(DatagramPacket datagramPacket, com.esotericsoftware.kryo.Kryo kryo)
Client discovers a host.datagramPacket - the same DatagramPacket from
onRequestNewDatagramPacket(), after being filled with
the incoming packet data.kryo - the Kryo instancevoid onFinally()
Client.discoverHost(int, int) or
Client.discoverHosts(int, int) method exits. This allows the
implementation to clean up any resources used, i.e. an Input.Copyright © 2014. All Rights Reserved.