From owner-freebsd-questions Thu Jul 19 14: 4:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from jezebel.demon.co.uk (jezebel.demon.co.uk [158.152.38.143]) by hub.freebsd.org (Postfix) with ESMTP id B526A37B405 for ; Thu, 19 Jul 2001 14:04:36 -0700 (PDT) (envelope-from rdls@jezebel.demon.co.uk) Received: (from rdls@localhost) by jezebel.demon.co.uk (8.11.1/8.11.1) id f6JL1WQ01105; Thu, 19 Jul 2001 22:01:32 +0100 (BST) (envelope-from rdls) Date: Thu, 19 Jul 2001 22:01:31 +0100 From: Richard Smith To: Marcus Obst Cc: freebsd-questions@freebsd.org Subject: Re: close on non-blocking socket Message-ID: <20010719220131.A1027@gaia.home.rdls.net> References: <20010719183130.A7106@apfel.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010719183130.A7106@apfel.sax.de>; from mobst@apfel.sax.de on Thu, Jul 19, 2001 at 06:31:30PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jul 19, 2001 at 06:31:30PM +0200, Marcus Obst wrote: > Hello, > > I am in doubt about the following; > what happens when a non-blocking socket that still has pending outgoing > data is closed? In my network book (by R. Stevens) I read that TCP will > try to flush the data already queued in the output buffer. But in the > FreeBSD man page of close I got: > > on the last close of a socket(2) associated naming information and > queued data are discarded > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > What's right ...? The behaviour of close(2) in this case, is modified by SO_LINGER (see getsockopt(2)). Richard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message