Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.protocols.tcp-ip    |    TCP and IP network protocols.    |    14,669 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 13,465 of 14,669    |
|    Jorgen Grahn to EJP    |
|    Re: Reading UDP at high rates, and selec    |
|    15 Mar 10 11:46:38    |
      From: grahn+nntp@snipabacken.se              On Mon, 2010-03-15, EJP wrote:       > On 13/03/2010 7:23 PM, Jorgen Grahn wrote:       >> When an UDP socket is       >> readable, I try to read one datagram from it, process it, and go back       >> to select.       >       > Assuming you're in non-blocking mode, read as many datagrams you can at       > this point, until you get the zero or whatever it is in your API that       > tells you there is no more data.              Yes, that's what I described as my option (B) a few lines further down.              > Also assuming this thread has nothing       > else to do ;-)              That's a good point. Mine *does* have other work to do, so I can, for       example, limit myself to max 50 recv()s on an fd after one select() says       it's readable.              /Jorgen              --        // Jorgen Grahn |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca