A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008165.html below:

[Python-bugs-list] [Bug #111620] lots of use of send() without verifyi ng amount of data sent.

[Python-Dev] noreply@sourceforge.net: [Python-bugs-list] [Bug #111620] lots of use of send() without verifyi ng amount of data sent. [Python-Dev] noreply@sourceforge.net: [Python-bugs-list] [Bug #111620] lots of use of send() without verifyi ng amount of data sent.Fredrik Lundh fredrik@pythonware.com
Fri, 11 Aug 2000 15:55:01 +0200
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