On Fri, Aug 16, 2013 at 12:06 PM, Brian Lalor <[email protected]> wrote: > On Aug 16, 2013, at 6:05 AM, Ben Noordhuis <[email protected]> wrote: > >>> To your point about pause/resume, Jake: there's no flow control with UDP. >>> What're the consequences of not honoring a return of false from >>> Readable#push()? >> >> There is no flow control but UDP is still rate-limited - a process >> cannot send datagrams faster than the operating system and the >> hardware can send them out. Node.js starts queueing datagrams in user >> space when that happens. > > Thanks, Ben. Is there any feedback to the process that this is happening?
Yes and no. Libuv knows when the kernel's send buffer is full but it doesn't yet convey that information to node.js. It would require some rework to get that information from libuv to the user because dgram.Socket#send() is asynchronous. It returns before libuv has gotten around to calling write() or sendmsg() so you don't know at that point whether it's going to queue. (We could approximate that by checking if there are already datagrams queued up.) If you have a pressing need for this, file an issue and we'll look into it. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
