use of com.tvd12.ezyfoxserver.stresstest.handler.UdpHandshakeHandler in project ezyfox-server-example by tvd12.
the class SocketClientSetup method setup.
public void setup(EzyClient client, boolean useUdp) {
int count = counter.incrementAndGet();
EzySetup setup = client.setup();
setup.addDataHandler(EzyCommand.HANDSHAKE, new HandshakeHandler(count));
setup.addDataHandler(EzyCommand.LOGIN, new LoginSuccessHandler(useUdp));
setup.addDataHandler(EzyCommand.UDP_HANDSHAKE, new UdpHandshakeHandler());
setup.addDataHandler(EzyCommand.APP_ACCESS, new AccessAppHandler(useUdp, messageCount, executorService));
EzyAppSetup appSetup = setup.setupApp("hello-world");
appSetup.addDataHandler("broadcastMessage", (app, data) -> {
// String message = ((EzyObject)data).get("message", String.class);
// System.out.println("tcp > server response: " + message);
});
appSetup.addDataHandler("udpBroadcastMessage", (app, data) -> {
// String message = ((EzyObject)data).get("message", String.class);
// System.out.println("udp > server response: " + message);
});
}
Aggregations