From: Rick Jones <rick.jones2@hp.com>
To: Huajun Li <huajun.li.lee@gmail.com>
Cc: ZHOU Xiaobo <xb.zhou@qq.com>, netdev <netdev@vger.kernel.org>
Subject: Re: write() udp socket
Date: Mon, 25 Jul 2011 10:38:12 -0700 [thread overview]
Message-ID: <4E2DAA04.2070205@hp.com> (raw)
In-Reply-To: <CA+v9cxZAF27mXc6aCEPyOdqbeLved3_xibvDS4TQugHR=7owPg@mail.gmail.com>
On 07/24/2011 01:33 AM, Huajun Li wrote:
> 2011/7/23 ZHOU Xiaobo<xb.zhou@qq.com>:
>> question No1:
>> When I call
>> ssize_t write(int fd, const void *buf, size_t count);
>>
>>
>> on a nonblocking UDP socket, is the return value always equal to 'count'?
>>
>>
>
> I don't think so. The function may be interrupt by signal or return
> due to other reason, so the return value only represents the size it
> writes successfully to the fd.
I believe it should either appaear to succeed or fail. write() best not
be sending partial UDP datagrams. That would be "bad."
next prev parent reply other threads:[~2011-07-25 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-23 9:29 write() udp socket ZHOU Xiaobo
2011-07-24 8:33 ` Huajun Li
2011-07-25 17:38 ` Rick Jones [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-07-26 5:32 ZHOU Xiaobo
2011-07-26 5:39 ZHOU Xiaobo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E2DAA04.2070205@hp.com \
--to=rick.jones2@hp.com \
--cc=huajun.li.lee@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xb.zhou@qq.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.