[plt-scheme] A problem about TCP program

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Jan 11 13:23:41 EST 2010

On Jan 10, Thomas Chust wrote:
> 2010/1/10 Plato Wu <gtalk000 at gmail.com>:
> > Thank you very much! It works, However my Scheme application is
> > used to connect a server which uses UC TCP/IP stack's socket
> > Layer, It don't have API like flush-output, How can I do with this
> > situation?
> > [...]
> the classical BSD socket API for C programs doesn't do any
> buffering, so flushing should be unnecessary unless you have wrapped
> your sockets in another layer.

This might be irrelevant now, but flushing is something that should be
done because there might be a buffering layer...  I don't remember
offhand whether mzscheme implements its own buffering -- but is it
important?  If it doesn't, and tomorrow it does, then the assumption
will break anyway.  Also, you can wrap the network ports inside
Scheme, and that can introduce yet more buffering.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.