title: Golang Read Bytes from net.TCPConn
body: <p>Is there a version of <code>ioutil.ReadAll</code> that will read until it reaches an EOF OR if it reads <code>n</code> bytes (whichever comes first)? </p>
  
  <p>I cannot just take the first <code>n</code> bytes from an <code>ioutil.ReadAll</code> dump for DOS reasons. </p>