guido wrote: > I just read the man page for send() (Red Hat linux 6.1) and it doesn't > mention sending fewer than all bytes at all. In fact, while it says > that the return value is the number of bytes sent, it at least > *suggests* that it will return an error whenever not everything can be > sent -- even in non-blocking mode. > > Under what circumstances can send() return a smaller number? never, it seems: The length of the message to be sent is specified by the length argument. If the message is too long to pass through the underlying protocol, send() fails and no data is transmitted. Successful completion of a call to send() does not guarantee delivery of the message. A return value of -1 indicates only locally-detected errors. If space is not available at the sending socket to hold the message to be transmitted and the socket file descriptor does not have O_NONBLOCK set, send() blocks until space is available. If space is not available at the sending socket to hold the message to be transmitted and the socket file descriptor does have O_NONBLOCK set, send() will fail. (from SUSv2) iow, it either blocks or fails. </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4