import com.esotericsoftware.kryonet.Listener;
import com.esotericsoftware.kryonet.Server;
public class DeflateTest extends KryoNetTestCase {
public void testDeflate () throws IOException {
final Server server = new Server();
register(server.getKryo());
final SomeData data = new SomeData();
data.text = "some text here aaaaaaaaaabbbbbbbbbbbcccccccccc";
data.stuff = new short[] {1, 2, 3, 4, 5, 6, 7, 8};
final ArrayList a = new ArrayList();
a.add(12);
a.add(null);
a.add(34);
startEndPoint(server);
server.bind(tcpPort, udpPort);
server.addListener(new Listener() {
public void connected (Connection connection) {
server.sendToAllTCP(data);
connection.sendTCP(data);
connection.sendTCP(a);
}
});