title: Under Linux, can recv ever return 0 on UDP?
body: <p>I'm just cleaning up some code we wrote a while back and noticed that for a udp socket, 0 is being treated as the connection closed.</p>
  
  <p>I'm quite sure this was the result of porting the same recv loop from the equivalent tcp version.  But it makes me wonder.  Can recv return 0 for udp?  on tcp it signals the other end has closed the connection.  udp doesn't have the concept of a connection so can it return 0? and if it can, what is it's meaning?  </p>
  
  <p>Note: the man page in linux does not distinguish udp and tcp for a return code of zero which may be why we kept the check in the code.</p>