I am attempting to send my custom packet object through a connected socket. I serialize and turn the object into a byte array, which is then sent. However, how can I determine the end of the buffer stream on the receiving end?
If I send text, I can add a simple "" tag at the end and check for that, however I am not sure would be a good approach in the case of this class object..
What is the common approach to this problem?