title: Using write()/read() on UDP socket?
body: <p>According to the man pages:</p>
  
  <blockquote>
    <p>The only difference between send() and write(2) is the presence of flags.  With a zero flags argument, send() is equivalent to write(2). Also, the following call send(sockfd, buf, len, flags); is equivalent to sendto(sockfd, buf, len, flags, NULL, 0);  </p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>The recv() call is normally used only on a connected socket (see connect(2)) and is identical to recvfrom() with a NULL src_addr argument.</p>
  </blockquote>
  
  <p>Also,  if I'm not wrong (couldn't find it in the man pages), <code>recv</code> with <code>flags == 0</code> is equivalent to <code>read</code> (analogue to <code>write</code> and <code>send</code>).</p>
  
  <hr>
  
  <p>So:</p>
  
  <ul>
  <li>does this mean, that using <code>read</code>on a UDP socket is perfectly fine (if I don't need the <code>src_addr</code>)?</li>
  <li>is there a way to use <code>write</code> on UDP socket (as now I set the destination address in <code>sendto</code>'s <code>dest_addr</code> parameter)?</li>
  </ul>