title: sending a big file in UDP in C
body: <p>I am trying to send a stream of <strong>327200 bytes</strong> frames</p>
  
  <p>so I decided to divide each frame into 6 packets each packet of <strong>51200 bytes</strong> and then send it;</p>
  
  <pre><code>void sendframe(char *data)
  {
      char *tmparr[6];
      for(int i=0;i&lt;6;i++)
      {
          tmparr[i] = data +(i*51200);
      }
      for(int i=0;i&lt;6;i++)
      {
          n = sendto(sockfd, tmparr[i], 51200, 0, (struct sockaddr*)&amp;serveraddr, sizeof(serveraddr));
          if (n &lt; 0)
            error("ERROR in sendto");
      }
  }
  </code></pre>
  
  <p>Why the server <strong><em>only</em></strong> receives 4 or 5 packets ??
  never 6 nor less than 4, and their is no loss in the packet, each packet is 51200 bytes, the loss is only in the packet number it never receives a incomplete packet ??</p>
  
  <p><strong>Note that:</strong>
  I am using linux and the sender and receiver are the localhost</p>