[plt-scheme] A problem about TCP program

From: Thomas Chust (chust at web.de)
Date: Mon Jan 11 14:12:06 EST 2010

2010/1/11 Eli Barzilay <eli at barzilay.org>:
> 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...
> [...]

Hello,

*if* there is an API to flush buffers, you are quite right. But when
dealing with raw socket descriptors there are neither buffers nor
library calls to flush them, except perhaps for some completely
unportable system call instructing the kernel to flush internal
network protocol buffers.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.