[ENH] SocketStream ascii/binary and nextAvailable

Luciano Notarfrancesco lnotarfrancesco at yahoo.com
Thu Jul 24 20:43:40 UTC 2003


Michael Rueger wrote:

> Although it looks good to me I would rather not add it to the image. 
> This whole binary/text/crlf/multibyte issue needs to be solved 
> differently. See the Stream refactoring discussion from a while ago. 

I agree completly. I'd really like to see Flow integrated into the base 
image. Or at least we should have some sort of ExternalStream or 
ResourceStream with subclasses like FileStream and SocketStream. I think 
the binary/ascii functionality belongs to this ExternalStream or 
ResourceStream.

How are we going to do that? Are we ever going to make such a big 
refactoring? Is such a big change ever going to make it to the update 
stream?

>
> What do you use the nextAvailable calls for? Just curious...

I use it when I don't know how much data or what kind of data the other 
end will send. For instance, I use it in a banner grabber that connects 
to a given address and port, waits a little while, and then retrieves 
whatever the server sent and closes the connection.

Luciano



More information about the Squeak-dev mailing list