On Fri, Aug 5, 2011 at 9:34 AM, Wes Hardaker <harda...@users.sourceforge.net> wrote: >>>>>> On Fri, 5 Aug 2011 11:42:36 +0200, Bart Van Assche <bvanass...@acm.org> >>>>>> 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)).
recv(2) in FreeBSD says similar BTW: The flags argument to a recv() function is formed by or'ing one or more of the values: MSG_OOB process out-of-band data MSG_PEEK peek at incoming message MSG_WAITALL wait for full request or error MSG_DONTWAIT do not block ... returned. The MSG_DONTWAIT flag requests the call to return when it would block otherwise. If no data is available, errno is set to EAGAIN. This flag is not available in strict ANSI or C99 compilation mode. It might be wise to add this to the next POSIX spec. Thanks, -Garrett ------------------------------------------------------------------------------ BlackBerry® 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 Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders