title: socket programming, what happen if I write data more than one TCP/UDP packet can carry?
body: <p>I have a question about socket programming. When I use socket to send the data, we can use the API such as sendto() to send using TCP or UDP.
  For sendto(), we give a array pointer and the byte number we want to send.</p>
  
  <p>In this case, if I gave a large byte number (e.g.: 20000 bytes), based on my understanding, MTU of the network will not be that big so socket actually send mutiple packets instead of one big packet. Since these 20000 bytes are split into several UDP/TCP packets, but will these 20000 bytes be seen as one packet at beginning? Is this process UDP/TCP fragmentation ?  </p>
  
  <p>My another question is if  I put the data size smaller than MTU into sendto(), then I can gurantee call sendto() once, socket only sends one TCP/UDP packet?</p>
  
  <p>Thanks in advance.</p>