socket synchronization
Michael Rueger
m.rueger at acm.org
Wed Nov 20 02:19:19 UTC 2002
Michael Rueger wrote:
>
>
> Andreas.Raab at gmx.de wrote:
> > glab server). There's clearly a huge inefficiency (bug?!) in
> > SocketStream's upToAll: implementation which will *always* have to
> > time out unless the server
>
> Good one!!
Thinking about it again:
upToAll: delims
| searchBuffer index |
searchBuffer _ String new.
[searchBuffer _ searchBuffer , self inStream contents.
self resetInStream.
index _ searchBuffer indexOfSubCollection: delims startingAt: 1.
index = 0]
whileTrue: [self receiveData].
receiveData is only called when data is required, so there should be no
difference between this version and replacing it with receiveDataNoWait.
If there is data, then the call should return before the timeout anyways???
Did anybody try replacing the call and notice any difference?
Michael
More information about the Squeak-dev
mailing list
|