Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 1997 16:37:27 -0700 (PDT)
From:      0000-Administrator  <root@acromail.ml.org>
To:        freebsd-hackers@freebsd.org
Cc:        freebsd-stable@freebsd.org
Subject:   A small buffer question..
Message-ID:  <Pine.BSF.3.96.970813163130.2479A-100000@acromail.ml.org>

next in thread | raw e-mail | index | archive | help

If the low level write() call is used to write to a data file then unlike
fwrite() where you must do an fflush to make sure that info is on disk I
am assuming that some type of flush is not necessary (can someone fill me
in on how to insure when using write() and read() calls that the data
actually gets to the disk), more importantly though if I open a socket and
then use a connect call to connect to a remote system and use write() to
write a block of data, is that block of data sent entirely as soon as
possible?
 
I have basically handled these things when using the stdio library i.e
fwrite, printf etc., and found that an fflush is absolutely required to
get the packets out of the buffers etc and sent -- I am just not that sure
about how buffering (at the os level not library level) in this case
affects this.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970813163130.2479A-100000>