title: Dynamically sized Uint8Array when receiving data over TCP network
body: <p>I have successfully built a simple TCP server, here is my code:</p>
  <pre class="lang-js prettyprint-override"><code>const server = Deno.listen({ port:3000 })
  
  for await (const conn of server) {
    let d = new Uint8Array(1024)
  
    await conn.read(d)
  
    console.log(d)
  }
  </code></pre>
  <p>This works well, at some point, it’s not a big problem. However I don’t want to manually set the Uint8Array size and slices the uint8array by length received from <code>conn.read()</code>.</p>
  <p>Is there any workaround to handle this?</p>
  <p>Dynamically sized Uint8Array that received from <code>conn.read()</code></p>