On Fri, Aug 5, 2011 at 6:34 PM, Wes Hardaker <[email protected]
> wrote:

> >>>>> On Fri, 5 Aug 2011 11:42:36 +0200, Bart Van Assche <
> [email protected]> said:
>
> BVA> I'm not sure the above is correct. My interpretation is that
> MSG_DONTWAIT
> BVA> returns as soon as the send buffer is full, hence using that flag in
> BVA> apps/sshtosnmp.c is dangerous.
>
> Where did you read that?
>
> In the linux man page it says (only):
>
>       MSG_DONTWAIT (since Linux 2.2)
>              Enables  nonblocking  operation;  if  the operation would
> block,
>              EAGAIN or EWOULDBLOCK is returned  (this  can  also  be
>  enabled
>              using the O_NONBLOCK flag with the F_SETFL fcntl(2)).
>

As far as I know you avoid reading GPLv2 licensed source code in order to
avoid copyright violations ?

Anyway, I had a look at the implementation in the Linux kernel of TCP
sending. As anyone can see in tcp_sendmsg(), the MSG_DONTWAIT flag prevents
that that function blocks but does not prevent that function to send data
over the socket.

See also
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=net/ipv4/tcp.c

Bart.
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to