From owner-freebsd-hackers Wed Aug 13 16:37:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA07288 for hackers-outgoing; Wed, 13 Aug 1997 16:37:31 -0700 (PDT) Received: from acromail.ml.org (acroal.vip.best.com [206.86.222.181]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA07272; Wed, 13 Aug 1997 16:37:26 -0700 (PDT) Received: from localhost (root@localhost) by acromail.ml.org (8.8.6/8.8.5) with SMTP id QAA02501; Wed, 13 Aug 1997 16:37:28 -0700 (PDT) Date: Wed, 13 Aug 1997 16:37:27 -0700 (PDT) From: 0000-Administrator To: freebsd-hackers@freebsd.org cc: freebsd-stable@freebsd.org Subject: A small buffer question.. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.