From: Gabe W. <gw...@wa...> - 2002-01-30 07:40:49
|
From Sean: "> I'm thinking that the best way to replace all the datastream complexity > stuff is to simply use (for reading) an iterator interface which would > produce a series of BufferSegment objects (frame.BufferSegment). It > wouldn't be, strictly speaking, an iterator, because it would sometimes > return nothing when the "stream" wasn't closed but nothing was available > (ie non-blocking read). But otherwise an iterator. Could we perhaps build something with an exception in this case, which could be handled further up the object model? " I would say that an exception is not appropriate because the situation would occur when there is no more buffer segments available because data is still arriving (or is expected to arrive given the message size). Maybe a "blocking" iterator (getNext()) would be appropriate, but I would think that there are sometimes when you may not want to block... -Gabe -- Gabe Wachob gw...@wa... Personal http://www.wachob.com CTO, WiredObjects http://www.wiredobjects.com |