title: Looking for nodejs library for stream behavior like Flash has
body: <p>I'm working on a multiplayer game in Flash &amp; Nodejs for the server (TCP).</p>
  
  <p>In Flash there is this stream behavior where if you do example:
  socket.readUnsignedByte() it will return the byte(s) from the stream from 0 position, and then it will get rid of it from the stream.</p>
  
  <p>The stream is all the data that is being sent from server to Flash, and it stays there until I read it. I can read it bit by bit (not literally bit), whenever I feel like, and this is the behavior I want. I need to know how much data there is in the stream and be able to do things like readUnsignedInt().</p>
  
  <p>For example I got:
  0x01 0x0 0x0 0x0 0x0a</p>
  
  <p>and I do: .readUnsignedByte(), it will return the 0x01, and the stream will change to:
  0x0 0x0 0x0 0x0a, and be reduced to the size of 4 bytes from 5 bytes.</p>
  
  <p>So I'd be looking for something like stream.readUInt32();...</p>
  
  <p>Is there any library to accomplish this?</p>