use of de.datasecs.hydra.shared.protocol.packets.StandardPacket in project Hydra by DataSecs.
the class TestServerPacketListener method onStandardPacket.
@PacketHandler
public void onStandardPacket(StandardPacket standardPacket, Session session) {
Assertions.assertTrue(session.isConnected());
session.send(new StandardPacket("#Received!"));
}
use of de.datasecs.hydra.shared.protocol.packets.StandardPacket in project Hydra by DataSecs.
the class TestServerPacketListener method onTestPacket.
@PacketHandler
public void onTestPacket(TestPacket examplePacket, Session session) {
Assertions.assertTrue(session.isConnected());
switch(examplePacket.getNumber()) {
case 0:
Assertions.assertEquals("Test", examplePacket.getObject().toString());
break;
}
session.send(new StandardPacket("#Received!"));
session.send(new TestPacket(examplePacket.getNumber(), "test"));
}
Aggregations