Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 1996 19:22:08 -0500 (EST)
From:      "Marc G. Fournier" <scrappy@ki.net>
To:        John Polstra <jdp@polstra.com>
Cc:        Joe Greco <jgreco@brasil.moneng.mei.com>, hackers@FreeBSD.org
Subject:   Re: Sockets question... 
Message-ID:  <Pine.NEB.3.95.961114192040.11486K-100000@quagmire.ki.net>
In-Reply-To: <199611150002.QAA10843@austin.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Nov 1996, John Polstra wrote:

> > > Are you checking the return value from write() to make sure it actually
> > > thinks that N bytes were _written_?
> > >
> > 	*sigh*
> 
> Well now, wait a minute.  As long as you haven't set the socket for
> non-blocking I/O, the write will always block until it's written the
> full N bytes that you asked for.  In other words, the write will always
> return either -1 or N.  Only if it's set up for non-blocking I/O can it
> return a short count.  Writes are different from reads in this respect.
>
	Oh good, that's what *I* thought...but since I'm totally new to
socket programming...I foolishly didn't question :)

Marc G. Fournier                                  scrappy@ki.net
Systems Administrator @ ki.net               scrappy@freebsd.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.961114192040.11486K-100000>