[squeak-dev] What is the contract of SocketStream>>#next:?

Chris Muller asqueaker at gmail.com
Tue Oct 7 19:41:02 UTC 2014


Assuming its 'shouldSignal' is true, if I say:

  mySocketStream next: 4

shouldn't I be guaranteed either 4 bytes of data, or an exception
(Timeout or ConnectionClosed)?  But, never less than 4 bytes of data,
right?

Over the last few weeks I have been running very heavy networking and
noticed several times "SocketStream>>#next: 4" returning me either an
empty Array or nil.  I've seen it more than once but can't reproduce
it.

Wouldn't that have to be a bug?


More information about the Squeak-dev mailing list