On 5/20/06, Christian Cantrell <[EMAIL PROTECTED]> wrote:
On May 19, 2006, at 8:58 PM, Trejkaz wrote:
I can get the component working, I just don't like the architecture.
All the examples I've seen use an infinite loop to process packets
from the stream rather than blocking until packets come in and then
routing them appropriately.  If I knew why it was done this way, and
the advantages, I would probably be ok with it, but it seems like an
unnecessary waste of resources as the infinite loop is very processor
intensive.  Any idea why the demos are done this way?

Why don't you use the java equivalent of poll or select? This way the
program will block when there's nothing to do, and only 'execute' when
data is received.

--
- Norman Rasmussen
- Email: [EMAIL PROTECTED]
- Home page: http://norman.rasmussen.co.za/

Reply via email to