[squeak-dev] SocketStream not a Stream?
Göran Krampe
goran at krampe.se
Tue Nov 2 16:00:45 UTC 2010
Hi!
On 11/02/2010 03:48 PM, Ralph Boland wrote:
> I don't know anything about SocketStream so my comments may be
> way off base.
>
> If SocketStream does both output and input then it sounds like it should
> have an instance variable (a Stream) for input and an instance variable
> (another Stream) for output.
That was indeed the original design of the old SocketStream btw. The
current implementation is instead written more directly using buffers to
get better performance.
> On the other hand if what you mean by
> doing input and output is that is reads and writes to the same place then
> it sounds like SocketStream should not only be a subclass of Stream but
> a subclass of ReadWriteStream.
I don't think so, a ReadWriteStream typically reads and writes the
*same* buffer. A SocketStream wraps a Socket which talks to a service
that decides what to answer etc.
regards, Göran
More information about the Squeak-dev
mailing list
|