I am processing time critical messages which are routed to me via a very slow network connection. I am connecting to the originating server (which I have no control over) with a Java TCP/IP Socket. The data is of varying length but is usually around 5000bytes and so ends up getting broken into multiple packets of roughly 1400 bytes.
Is there any way in my Java client-side code that I can control the size of the packets that are used to send me the data? I would like to experiment with explicitly using smaller packets sizes, for example 500 byte packets, which would decrease the time it takes for me to receive the first byte of the message at the (possible) cost of increased header overhead.