From owner-freebsd-net Wed Sep 20 2:14:12 2000 Delivered-To: freebsd-net@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id DD3FA37B422 for ; Wed, 20 Sep 2000 02:14:10 -0700 (PDT) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id CAA05368; Wed, 20 Sep 2000 02:09:49 -0700 (PDT) Message-Id: <200009200909.CAA05368@implode.root.com> To: William Weston Cc: freebsd-net@FreeBSD.ORG Subject: Re: sendfile() questions In-reply-to: Your message of "Tue, 19 Sep 2000 10:57:20 CDT." From: David Greenman Reply-To: dg@root.com Date: Wed, 20 Sep 2000 02:09:49 -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Is it better to put a packet header into an iovec and have sendfile() take >care of it, or to write the header to the socket using writev() (or >something similar) and then use sendfile just for sending the file off the >filesystem? It's better to use header/trailer iovecs with sendfile(). You save a couple of system calls that way. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message