Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!NUSDISCS.BITNET!TAYBENGH From: TAYBENGH@NUSDISCS.BITNET (THE AGEIS) Newsgroups: comp.protocols.tcp-ip Subject: Re: Blocking /non blocking Message-ID: Date: 11 Mar 91 08:51:49 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 15 X-Unparsable-Date: Mon, 11 Mar 91 15:53 SST In-Reply-To: your letter rec'd 11-MAR-1991 15:06:15.40 All the socket system calls (send, sendto, recv & recvfr ...) are blocking calls. Blocking send means the send will be blocked if the send buffer is not big enough (currently) to hold the data. If u choose to un-block the calls, the system call returns whatever bytes u can put into the send buffer. For the datagram calls, it the send data is larger than maximum set (can be changed using setsockopt()), then the system will only send the maximum allowed and return to u about the bytes send. Bon-blocking recv means if there is no data present, the calls will just return -1 with errno set EWOULDBLOCK. Hope this helps. - Beng Hang (email: taybengh@nusdiscs)