I would like to be able to get the length of the data available from a TCP network stream in C# to set the size of the buffer before reading from the network stream. There i
There is no inherent length of a network stream. You will either have to send the length of the data to follow from the other end or read all of the incoming data into a different stream where you can access the length information.