From owner-freebsd-stable Thu Mar 29 11:45:51 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.infolibria.com (mail.infolibria.com [12.30.17.31]) by hub.freebsd.org (Postfix) with ESMTP id C1D6037B720 for ; Thu, 29 Mar 2001 11:45:49 -0800 (PST) (envelope-from pmarquis@pobox.com) Received: from pobox.com (gw.infolibria.com [12.30.17.254]) by mail.infolibria.com (Postfix) with ESMTP id 3AFEE15CC04; Thu, 29 Mar 2001 14:43:14 -0500 (EST) Message-ID: <3AC390FD.6C03BF8F@pobox.com> Date: Thu, 29 Mar 2001 14:46:05 -0500 From: Paul Marquis X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Jim King Cc: Nate Williams , Brian Matthews , Allen Landsidel , freebsd-stable@FreeBSD.ORG Subject: Re: Threads vs. blocking sockets References: <15043.35980.669828.971544@nomad.yogotech.com> <00dd01c0b886$d8510250$524c8486@jking> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Under the manual entry for send(2), the RETURN VALUES section states: The call returns the number of characters sent, or -1 if an error occured. So if you request to send 100 bytes, the OS may only be able to sent half those and you need to check how many you sent an resend the part that wasn't sent. Nate is right. Jim King wrote: > Nate Williams wrote: > > Again, all threading libraries I've used (not just on FreeBSD) *require* > > the user to check that when sending/receiving data, the caller must make > > sure that all the expected data has been sent/received. > > The man page for send(2) doesn't mention this. It sounds broken to me. -- Paul Marquis pmarquis@pobox.com Five out of four people have trouble with fractions. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message