View topic - Wait on TCP/IP connection and other proxy
Wait on TCP/IP connection and other proxy
6 posts
• Page 1 of 1
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?
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?
- tommym121
- New Member
- Posts: 7
- Joined: Wed Aug 05, 2009 6:01 pm
RE: Wait on TCP/IP connection and other proxy
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.
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.
- mario
- QNX Master
- Posts: 4132
- Joined: Sun Sep 01, 2002 1:04 am
RE: Wait on TCP/IP connection and other proxy
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?
And what kind of thread issue in QNX 4.25. Just curious?
- tommym121
- New Member
- Posts: 7
- Joined: Wed Aug 05, 2009 6:01 pm
RE: Wait on TCP/IP connection and other proxy
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.
As for thread, it is just not officially supported and is more of a kludge.
- mario
- QNX Master
- Posts: 4132
- Joined: Sun Sep 01, 2002 1:04 am
RE: Wait on TCP/IP connection and other proxy
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.
- MSchneider
- Active Member
- Posts: 27
- Joined: Wed May 28, 2003 6:19 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests