[squeak-dev] Re: Streaming directly from WebResponse content to SketchMorph

Colin Putney colin at wiresong.com
Thu Oct 18 21:38:14 UTC 2012


On Thu, Oct 18, 2012 at 5:01 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 18 October 2012 11:41, Göran Krampe <goran at krampe.se> wrote:
>> Hi!
>>
>> I pretty recently did some work for Citilabs reviving my "streaming
>> reception in SocketStream/Kom" in order to deal with very large file
>> uploads. That adds a "chunk wise" method to SocketStream so that one can
>> "read a bit at a time" and do things with it.
>
> Sounds like a reason to use Xtreams...

Yes, this sort of thing is where Xtreams shines. The Altitude http
client examines the Content-Length header, then returns a limited
stream, so that you can read the response content until the end of the
stream and close it when you're done, without blocking on a socket
read or closing the socket. Xtreams also has a buffering stream so
that clients like PNGReadWriter can skip around, even when the
underlying data source doesn't support that.

Colin


More information about the Squeak-dev mailing list