c# Sockets sending Length of the Data
<p>I m using Tcp Protocol on my server/client Application , since its stream oriented protocol i need to keep receiving till i hit the size of the data sent .
if i send The Length of data First </p>

<pre><code> byte[] Data; //this is the data
 byte[] DataLength = BitConverter.GetBytes(Data.Length); // Length of the data
</code></pre>

<p>while The Size of DataLength can't exceed 4 bytes  </p>

<pre><code>Socket.Receive(BufferLength,0,4,0); // receiving lenth
</code></pre>

<p>does it still  not confirmed to receive the bytes that holds the full length of the data that will be sent in one receive ? so that i can know how much i need to call the receive method for the nexts coming bytes ?</p>

<p><strong>edit</strong> : i only want to know one receive call can't get the length of the data that will be sent ? can't surely get 4 bytes in one call ?
<br>for Example My data Length is 1024 I took that length i encoded it to byte[] then i send it first does one call is able to get that length in one call ?</p>