When I have a TCP connection that uses packets.. (Server / Client Application) Should I keep sending a packet back and forth (Between the server and client) just to see if the connection is alive or is that unnecessary? like a KeepAlive packet..
another question is does it make a huge difference (performance wise) if I send an int (DataOutputStream) though a stream instead of sending a Packet object (ObjectOutputStream) which has like an average of 5 fields at least 3 methods and some getters and setters? would it make such a big difference performance wise?