title: Buffered socket reading
body: <p>I have a problem - I don't know the amount of data being sent to my UDP server.</p>
  
  <p>The current code is this - testing in irb:</p>
  
  <pre><code>require 'sockets'
  sock = UDPSocket.new
  sock.bind('0.0.0.0',41588)
  
  sock.read # Returns nothing
  sock.recvfrom(1024) # Requires length of data to be read - I don't know this
  </code></pre>
  
  <p>I could set recvfrom to 65535 or some other large number but this seems like an unnecessary hack.</p>
  
  <p>recvfrom and recvfrom_nonblock both throw away anything after that length specified.</p>
  
  <p>Am I setting the socket up incorrectly?</p>