This size should be a part of you
application-layer protocol. You have to design how communicating party negotiate on size of data, formats, and many other things, as required. I'm talking about your own protocol, specific to your application, not one of the well-known ones. Please see:
Application layer — Wikipedia, the free encyclopedia[
^].
The communication can be organized on one of different levels. It can be done on one of several different levels of networking, remoting or WCF.
Please see my overview of these approaches in my past solutions:
how i can send byte[] to other pc,
Communication b/w two Windows applications on LAN..
—SA