FastSocketStream (was: FTP ConnectionTimedOut on 3.9)

goran at krampe.se goran at krampe.se
Thu Sep 8 06:49:45 UTC 2005


Hi!

Jecel Assumpcao Jr <jecel at merlintec.com> wrote:
> Göran,
> 
> > But... nah, then I started looking at the complex looking upToAll:
> > method (we need a new prim btw to make it better!) but eventually found
> > the much simpler cause in #sendCommand:. It doesn't flush. Oops.
> > 
> > So change it to:
> > 
> > sendCommand: aString
> > 	self nextPutAllFlush: aString, String crlf
> > 
> > After that it seems to work (you can test using a filelist, click at
> > UIUC on the bottom).
> 
> Done. And I changed ProtocolClient>>ensureConnection to once again use
> FastSocketStream instead of SocketStream. If you are reading this, then
> Celeste is now working :-)

Cool! And also, when I checked closer today I realized we should
principally not use nextPutAllFlush: (perhaps should be called
nextPutAllLarge: or something) because it actually first does a flush
and then sends the contents without going through the buffer. So it
actually ends up doing two Socket calls instead of just one.

In the case of sendCommand: we should probably just use nextPutAll:
followed by a flush.
 
> -- Jecel

regards, Göran

PS. I should put this on Mantis btw.



More information about the Squeak-dev mailing list