I have an app which communicates to another remote app via a posix socket.
Previously the communication has been very small messages, up to 10
bytes or so, back and forth.
Now one app is requesting a piece of larger data from the other app
(30k Bytes), and I have noticed that the communication is a less
smooth.
In particular, whereas previously I could read 1 byte blocking, then
continue reading until 'read' returned-1 (which would be the end of
the reply), I now see a return of -1 part way through the 30k reply,
and it picks up again later.
Before I rework this code to deal with this, I wanted to get any
general guidelines on the best way to handle exchange of larger
packets of data via sockets.