title: write() and send() solving errors => difference?
body: <p>could be any difference in solving errors between this two functions?:<br/>
  To this question brought me another question ... is number of characters always same as number of bytes? <br/>
  For more info: I use it in C on Linux for TCP socket comunication(sys/socket.h)
  Thanks for your responses.</p>
  
  <p><a href="http://www.linuxmanpages.com/man2/send.2.php" rel="nofollow noreferrer">send()</a> <br/>
  <a href="http://www.linuxmanpages.com/man2/write.2.php" rel="nofollow noreferrer">write()</a></p>
  
  <p>Return:<br/>
  write():<br/>
  On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. If count is zero and the file descriptor refers to a regular file, 0 will be returned without causing any other effect. For a special file, the results are not portable.<br>
  <br/>
  send():<br/>
  The calls return the number of characters sent, or -1 if an error occurred.<br>
  <br/>
  Question from stackoverflow which says that this methods should be same with using flag zero.<br/>
  <a href="https://stackoverflow.com/questions/1100432/performance-impact-of-using-write-instead-of-send-when-writing-to-a-socket">here</a></p>
  
  <pre><code>int client_sockfd;
  char* msg;
  int length = strlen(msg); 
  
  //first option
  if(send(client_sockfd, msg, length, 0) != length) return 1;
  else return 0;
  //second option 
  if(write(client_sockfd, msg, length) != length) return 1;
  else return 0;
  </code></pre>