Hiho. Everything was running without problems on localhost. Now the server is set on a professional host. The error is always the same:
10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: FATAL EXCEPTION: Thread-8160
10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: Process: com.drkmns.gameloopballs, PID: 5730
10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: com.esotericsoftware.kryo.KryoException: Buffer overflow. Available: 0, required: 9
The code is simple:
String host = ui.inputHost();
try {
client.connect(5000, host, Network.port);
// Server communication after connection can go here, or in Listener#connected().
} catch (IOException ex) {
ex.printStackTrace();
}
name = "MOJANAZWA";
Login login = new Login();
login.name = name;
client.sendTCP(login);
TestPacket test = new TestPacket();
while (true) {
test.msg = "33333333333333";
client.sendTCP(test);
}
The TestPacket class is just with a single string. When I connect via emulator everything works fine. When I open it on Samsung Galaxy S4 it throws this exception.
Already tried with increasing the buffer in Server's and Client's constructors - didn't work.
Any ideas?