I am creating an application under QNX 4.25 that uses Receive(0, …) to wait on a proxy, yet I need to create a thread that will uses TCP/IP SOCK_STREAM to deliver data to a client application in linux/windows world.
My application is served as a bridge to bring data for native QNX messaging (using queue) to get data from the old database and allow clients application using TCP/IP to query data it needs from the bridge.
Is that feasible? Can I have the Receive(proxy_id_from_queue, …) to handle the old database while have Select() within a thread to handle TCP/IP client request?
In theory yes, but threads and QNX4 are not real friend. I suggest you make every effort to avoid it.
I would write a separate program. Or just use a single thread and do the select and receive at the same time. Check the documentation on select, it will talk about _select_receive(). I’ve used this with success in the past.
Regarding threads in Qnx4. Several years ago, we had an application that used threads in Qnx4. I don’t remember the details, but I think the threads weren’t true threads because they were implemented by using separate processes.