I'm using an ObjectOutputStream over my socket because I created a new class that needs to be transported between the client and the server. I also created a unique thread that sends one byte every one second over the stream to the server in order to inspect the connection continuously and check that its alive.
byte b=1;
oos.writeObject(b);
I use "byte" because it is the smallest object that I can send (right?) so that the server will not read longer objects.
My question is if the server reads one byte object (size of byte) or an 8 byte object (the size of an object) ?