Wait on TCP/IP connection and other proxy

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.

What will be the best way to share the memory space between 32-bit processes?

And what kind of thread issue in QNX 4.25. Just curious?

Check out mmap() for sharing memory, but why not used messages?

As for thread, it is just not officially supported and is more of a kludge.

Thanks.

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.