Socket beginSend(...) method guarantee data?
<p>I can not understand C# socket beginSend(...)</p>

<p>[example]</p>

<pre><code>private void hardTest()
{
   send(); // 1
   send(); // 2
   send(); // 3
   send(); // 4
}

private void send()
{
   byte[] sendByffer = new byte[100];
   for(int i=0; i &lt; 100;i++)
     sendBuffer[i] = 1;

   socketStateObject.socket.BeginSend(sendBuffer, 0,
   sendBuffer.Length,                      
   SocketFlags.None, new AsyncCallback(sendCallback), socketStateObject.socket);
}

private void sendCallback(IAsyncResult ar)
{
   int sendLength = tempSocket.EndSend(ar);
}
</code></pre>

<hr>

<p>The program works, but I am concerned that even though I send 100 bytes, in <code>sendCallback</code>, <code>tempSocket.EndSend</code> returns 50.  Is the <code>BeginSend</code> method guaranteed to send 100 bytes, and should I be concerned with this behavior?</p>

<p>Thank you.</p>
