I'm sending an object which contains a 2X45x45 big 3-dimensional array. In every slot, there is a custom object which I also registered in kryonet. It seems to send fine but trying to recive it I keep getting this annoying error,
Exception in thread "Client" com.esotericsoftware.kryonet.KryoNetException: Unable to read object larger than read buffer: 12793 at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:118) at com.esotericsoftware.kryonet.Client.update(Client.java:247) at com.esotericsoftware.kryonet.Client.run(Client.java:333) at java.lang.Thread.run(Unknown Source)
I'm not entirely sure why I am getting it but I've tried increasing the buffer size of the client by doing this in it's constructor,
client = new Client((20 * 1024), 2 * 1024);
It doesn't seem to be doing much for me though. I've been trying to troubleshoot this for a while now, this is kind of my last resort. Does anyone have any idea what's going on and how I could solve this?
Also here's the object I'm sending for reference, it really shouldn't matter though since it seems to be sending fine:
public class MapDataPacket {
public String id;
public String name;
public Block[][][] map;
public MapDataPacket() {
}
}
I'm sending an object which contains a 2X45x45 big 3-dimensional array. In every slot, there is a custom object which I also registered in kryonet. It seems to send fine but trying to recive it I keep getting this annoying error,
I'm not entirely sure why I am getting it but I've tried increasing the buffer size of the client by doing this in it's constructor,
client = new Client((20 * 1024), 2 * 1024);
It doesn't seem to be doing much for me though. I've been trying to troubleshoot this for a while now, this is kind of my last resort. Does anyone have any idea what's going on and how I could solve this?Also here's the object I'm sending for reference, it really shouldn't matter though since it seems to be sending fine: