Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Emulating UDP networking using QNX messaging
Ref. No. QNX.000004253
Category(ies) Network, Development
Issue Is there a way to emulate UDP networking with QNX messaging?  We want to send connectionless datagrams between processes (on the same or
different nodes), and both the sending and receiving must be non-blocking.  All we've seen thus far has been the send, receive, reply protocol that involves the sender becoming send-blocked and then reply-blocked as the receiver gets the data.  We want to avoid blocking of any kind; the sender should make one non-blocking call to send a complete packet to the receiver, returning immediately to processing. 
The receiver should make a single non-blocking call that will receive an entire packet and return if one is present, and just return otherwise. 


Solution Some of the possible options include:

A) using a supplementary API such as POSIX message queues, TCP/IP, or the queue library from /usr/free/qnx4/os/samples/misc/queue.tgz

B) triggering a proxy, which is non-blocking. (In some cases, proxies may be used instead of messages.)

C) re-architecting the program interface so that processes communicate on a client-server model instead of a peer-to-peer model

D) setting up a "send client" to perform Send() requests