any characters written to a stringstream can be optionally read back again
using the b_stream read API.
this functions similar to a ringbuffer, with two key differences:
1) the buffer is not circular, and will continuously expand to accomodate all incoming data.
2) reading data from the stringstream does not remove it from the buffer.