Blair,
SocketReadStream resets its position in #readPage. It is reasonable to
conclude that one could get into trouble if trying to "rewind"? For
example, I frequently have need to read ahead into a stream, decide what
kind of data lurks therein, then backup to allow the appropriate type of
object read from the stream.
One obvious solution would be to have the target object read all but the
initial data. However, it's easier<g> to reposition.
I first encountered this with serial ports, but it's often necessary to do
some parsing and/or decoding to get the data I need, so in most cases, I end
up reading from a derived ReadStream over a string or byte array where
positioning works as expected.
I now have a problem that would be easier to solve if I could reposition a
SocketReadStream, but I'm afraid that it would not be reliable. Am I
missing something? If not, is SocketReadStream's behavior a bug or a
feature?
Have a good one,
Bill
--
Wilhelm K. Schwab, Ph.D.
[hidden email]