Date: Fri, 15 Nov 1996 11:24:14 PST From: Bill Fenner <fenner@parc.xerox.com> To: Terry Lambert <terry@lambert.org> Cc: jdp@polstra.com (John Polstra), scrappy@ki.net, jgreco@brasil.moneng.mei.com, hackers@freebsd.org Subject: Re: Sockets question... Message-ID: <96Nov15.112419pst.177557@crevenia.parc.xerox.com> In-Reply-To: Your message of "Fri, 15 Nov 1996 09:06:54 PST." <199611151706.KAA26239@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199611151706.KAA26239@phaeton.artisoft.com> Terry wrote: >How do I read into a structure on a machine that demands aligned >data access? You read into an intermediate buffer and copy it. You have to convert from network to machine representation anyway, so this isn't (much) more overhead. Or you use UDP if you want a record-oriented protocol. >nothing would work at all if you couldn't issue a read for n >bytes that didn't complete until you *got* n bytes. Well, I guess the BSD networking code has probably never worked at all. The read() system call on a socket is based on soreceive(), which returns up to N bytes. Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96Nov15.112419pst.177557>