From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 23 08:01:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A4C216A4CE; Fri, 23 Jan 2004 08:01:20 -0800 (PST) Received: from smtp2.enst.fr (reloaded.enst.fr [137.194.2.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96A4C43D66; Fri, 23 Jan 2004 08:00:44 -0800 (PST) (envelope-from pook@enst.fr) Received: from email.enst.fr (muse.enst.fr [137.194.2.33]) by smtp2.enst.fr (Postfix) with ESMTP id 02290463; Fri, 23 Jan 2004 17:00:42 +0100 (CET) Received: from roo (roo-ether.enst.fr [137.194.160.54]) by email.enst.fr (8.9.3/8.9.3) with ESMTP id RAA26213; Fri, 23 Jan 2004 17:00:42 +0100 (CET) Received: from pook (helo=roo) by roo with local-esmtp (Exim 3.36 #1 (Debian)) id 1Ak3jf-0006tv-00; Fri, 23 Jan 2004 17:00:43 +0100 To: Andre Oppermann From: Stuart Pook Organisation: Ecole Nationale Superieure des Telecommunications, Paris, France In-reply-to: Message from andre@freebsd.org of Fri, 23 Jan 2004 16:50:33 +0100. <401142C9.70502@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Date: Fri, 23 Jan 2004 17:00:43 +0100 Message-Id: Sender: Stuart Pook cc: freebsd-hackers@freebsd.org Subject: Re: send(2) does not block, send(2) man page wrong? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2004 16:01:20 -0000 > send() for UDP should block if the socket is filled and the interface > can't drain the data fast enough. It doesn't (at least I cannot make it block) > Good question. There is not feedback loop like in tcp, so handling this > blocking and releasing would be a little bit harder to do for UDP. Send(2) indicates that it should do so. > > I have written a test program, > > http://www.infres.enst.fr/~pook/send/server.c, that shows that send does > > not block on FreeBSD. It does with Linux and Solaris. > > Do you know what the behaviour of Net- and/or OpenBSD is? NetBSD is the same as FreeBSD. I have not tested OpenBSD. MacOS X is similiar to FreeBSD in that send doesn't block, howver the send does not give an error: the packet is just thrown away. Stuart