From owner-freebsd-current@FreeBSD.ORG Fri Nov 2 21:08:46 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 557F916A419 for ; Fri, 2 Nov 2007 21:08:46 +0000 (UTC) (envelope-from davids@webmaster.com) Received: from mail1.webmaster.com (mail1.webmaster.com [216.152.64.169]) by mx1.freebsd.org (Postfix) with ESMTP id 3F53813C481 for ; Fri, 2 Nov 2007 21:08:46 +0000 (UTC) (envelope-from davids@webmaster.com) Received: from however by webmaster.com (MDaemon.PRO.v8.1.3.R) with ESMTP id md50001756346.msg for ; Fri, 02 Nov 2007 13:58:14 -0700 From: "David Schwartz" To: "Ian FREISLICH" Date: Fri, 2 Nov 2007 13:57:18 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <20071102162523.A47979@fledge.watson.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal X-Authenticated-Sender: joelkatz@webmaster.com X-Spam-Processed: mail1.webmaster.com, Fri, 02 Nov 2007 13:58:14 -0700 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 206.171.168.138 X-Return-Path: davids@webmaster.com X-MDaemon-Deliver-To: current@freebsd.org X-MDAV-Processed: mail1.webmaster.com, Fri, 02 Nov 2007 13:58:17 -0700 Cc: current@freebsd.org Subject: RE: sendfile() not detecting closed connections. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davids@webmaster.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2007 21:08:46 -0000 > Probably what is happening is that sendfile() is counting bytes > successfully > inserted into the send socket buffer, rather than bytes sent on the wire. > This is consistent with what happens when you write a file to a > TCP socket, > though, as you only know the bytes made it into the buffer, not > to the remote > destination. I'd guess the threshold size you're seeing above is > the size of > the default send socket buffer. Don't think so. After all, the connection was known to be closed (on both ends) before he called 'sendfile'. So how could any bytes have successfully been put into the send buffer? DS