Commit graph

2 commits

Author SHA1 Message Date
Alex Mayfield
056cdff7ce Implement buffer reader functions
This functionality allows us to read data out of a buffer without
irrevocably consuming it.  We read what we can, and when we're done we
throw the reader away.

The plan is to read as much of a stream of data as is available, and if
we can't read a complete message, we simply toss the reader away and
try again when we get more data.  I think that perhaps this strategy
might be easier than coming up with a state machine to parse the stream.

Please do not advance the underlying buffer while trying to use a
reader.
2017-02-15 21:11:19 -05:00
Alex Mayfield
ccef38fb99 Implement a buffer for the TCP stream to go into 2017-02-13 00:36:13 -05:00