Skip navigation.
Home
The QNX Community Portal

View topic - Are there periodic tasks in in-net?

Are there periodic tasks in in-net?

Read-only archive of qnx.ddk (Writing device drivers for scanners, video card, optical mouse, etc) at inn.qnx.com

Are there periodic tasks in in-net?

Postby Dan Sperka » Wed Nov 29, 2006 7:39 pm

I'm working with an application that uses UDP packets for communication.
The application does a non-blocking select() call every millisecond on
the socket to see if there is a pending message.

I've noticed that every 0.5sec there is a pause - the app will do
several select() calls before finding a message (I'm fairly certain that
there IS a message pending in these instances).

I've tried different network cards with the same results - so it doesn't
seem to be related to the driver.

The communication is direct to another computer (running linux), with no
intervening hub or router. Neither machine has an internet connection
during these tests.

Although the messaging is tied to the video refresh of the linux
machine, the "pause" is not tied to that machine's frame rate or the
number of messages sent during that half-second.

Does io-net have any type of periodic (every half-second) tasks it
performs, and if so, is there a way to work around them?

Thanks,

Dan
Dan Sperka
 

Re: Are there periodic tasks in in-net?

Postby Q » Mon Dec 04, 2006 8:22 am

The application does a non-blocking select() call every millisecond on
the socket to see if there is a pending message.

it's not good way;
try to use notifications for incomming packets:
socket() + bind(),
and than dev_arm() in qnx4
or ionotify() with _NOTIFY_COND_INPUT in qnx6,
and than wait for packets in Receive() (qnx4)
or MsgReceive() (qnx6)
:)
Q
 


Return to qnx.ddk

Who is online

Users browsing this forum: No registered users and 1 guest