majumdar@bgsuvax.UUCP (anindo Majumdar) (03/11/91)
Are the sendto and recvfom calls (between datagram sockets) blocking or non blocking? The manual says both cas return the no of bytes send/recd. Does this mean that the call blocks untill the no of bytes specified is sent or recd by the destination address. E-mail (Internet) : majumdar@andy.bgsu.edu
TAYBENGH@NUSDISCS.BITNET (THE AGEIS) (03/11/91)
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)
subbarao@phoenix.Princeton.EDU (Kartik Subbarao) (03/11/91)
In article <7123@bgsuvax.UUCP> majumdar@bgsuvax.UUCP (anindo Majumdar) writes: > >Are the sendto and recvfom calls (between datagram sockets) blocking or >non blocking? The manual says both cas return the no of bytes send/recd. >Does this mean that the call blocks untill the no of bytes specified is sent >or recd by the destination address. I'd assume so, unless you did an fcntl(socket, F_SETFL, FNDELAY) somewhere that would set it to non-blocking. -Kartik -- internet# find . -name core -exec cat {} \; |& tee /dev/tty* subbarao@phoenix.Princeton.EDU -| Internet kartik@silvertone.Princeton.EDU (NeXT mail) SUBBARAO@PUCC.BITNET - Bitnet