title: recvfrom() only gets up to 2048 bytes from UDP socket
body: <p>I have to call the function repeatedly to get all data, given that the len argument is set to 10240. But this results in blocking at last. How can I get all the data and safely return in a platform independent way?</p>
  
  <p>BTW, I use netcat at the sender side:</p>
  
  <blockquote>
    <p>cat ocr_pi.png | nc -u server 5555</p>
  </blockquote>
  
  <p>Is this issue relative to nc's behavior? I didn't find any parameter to set UDP packet size(-O is for TCP).
  Thanks.</p>