QNX 4 to 6: select, select_receive, tcpip & QNX messages

bridged with qnx.rtos
Post Reply
Mark Dornbush

QNX 4 to 6: select, select_receive, tcpip & QNX messages

Post by Mark Dornbush » Fri Jan 23, 2004 3:19 pm

I am porting a QNX 4 system to QNX 6.2.1 patch B. Under QNX 4, select
and select_receive was used to handle receiving QNX messages and
tcp/ip messages in the same process. That isn't possible under QNX 6.

I've tried using io_notify on the socket fd to send MsgReceive a pulse
when data comes in on the socket. That works fine. However, I don't
get a pulse when there is a connection pending (before the call to
accept).

Could some one give me a pointer in the proper direction on how to
port the select / select_receive combination to QNX 6? I'm working on
the server side of the program.

Thanks,
Mark

Mario Charest

Re: QNX 4 to 6: select, select_receive, tcpip & QNX messages

Post by Mario Charest » Fri Jan 23, 2004 4:01 pm

"Mark Dornbush" <mark.NOdornbushSPAM@bepco.com> wrote in message
news:kre2105ngiae2ra1hf7n5hece1s3vrp59c@4ax.com...

I am porting a QNX 4 system to QNX 6.2.1 patch B. Under QNX 4, select
and select_receive was used to handle receiving QNX messages and
tcp/ip messages in the same process. That isn't possible under QNX 6.

I've tried using io_notify on the socket fd to send MsgReceive a pulse
when data comes in on the socket. That works fine. However, I don't
get a pulse when there is a connection pending (before the call to
accept).

Could some one give me a pointer in the proper direction on how to
port the select / select_receive combination to QNX 6? I'm working on
the server side of the program.
Using a thread to handle the TCP/IP connection comes to mind.
Thanks,
Mark

Mark Dornbush

Re: QNX 4 to 6: select, select_receive, tcpip & QNX messages

Post by Mark Dornbush » Fri Jan 23, 2004 4:16 pm

On Fri, 23 Jan 2004 11:01:19 -0500, "Mario Charest"
<postmaster@127.0.0.1> wrote:
"Mark Dornbush" <mark.NOdornbushSPAM@bepco.com> wrote in message
news:kre2105ngiae2ra1hf7n5hece1s3vrp59c@4ax.com...


I am porting a QNX 4 system to QNX 6.2.1 patch B. Under QNX 4, select
and select_receive was used to handle receiving QNX messages and
tcp/ip messages in the same process. That isn't possible under QNX 6.

I've tried using io_notify on the socket fd to send MsgReceive a pulse
when data comes in on the socket. That works fine. However, I don't
get a pulse when there is a connection pending (before the call to
accept).

Could some one give me a pointer in the proper direction on how to
port the select / select_receive combination to QNX 6? I'm working on
the server side of the program.

Using a thread to handle the TCP/IP connection comes to mind.


Thanks,
Mark

I thought about using a thread but I'd rather not do it that way. We
want to keep the QNX 4 and QNX 6 code as similar as possible. The QNX
4 code is has multiple processes but not multiple threads.

If I must I will use a separate thread but I'm hoping there is another
option.

Thanks

Rennie Allen

Re: QNX 4 to 6: select, select_receive, tcpip & QNX messages

Post by Rennie Allen » Sat Jan 24, 2004 1:45 am

Mark Dornbush wrote:
I thought about using a thread but I'd rather not do it that way. We
want to keep the QNX 4 and QNX 6 code as similar as possible. The QNX
4 code is has multiple processes but not multiple threads.

If I must I will use a separate thread but I'm hoping there is another
option.
You can do what you want. You need to implement your own select()
function, and callback a "_select_receive" function. You need to grab the
source to select() from cvs.qnx.com. Everything is there to do what you
need. It'll take a day or two to write a portability lib that'll allow
you to keep your code the same. I've done it, it ain't bad...

Rennie

Erick Muis

Re: QNX 4 to 6: select, select_receive, tcpip & QNX messages

Post by Erick Muis » Tue Jan 27, 2004 6:00 pm

Answered in qnx.porting

E.

Mark Dornbush <mark.NOdornbushSPAM@bepco.com> wrote:

I am porting a QNX 4 system to QNX 6.2.1 patch B. Under QNX 4, select
and select_receive was used to handle receiving QNX messages and
tcp/ip messages in the same process. That isn't possible under QNX 6.

I've tried using io_notify on the socket fd to send MsgReceive a pulse
when data comes in on the socket. That works fine. However, I don't
get a pulse when there is a connection pending (before the call to
accept).

Could some one give me a pointer in the proper direction on how to
port the select / select_receive combination to QNX 6? I'm working on
the server side of the program.

Thanks,
Mark
--
----------------------------------------
Erick Muis
Hardware Group
QNX Software Systems Ltd.
Email: emuis at qnx.com
----------------------------------------

Post Reply

Return to “qnx.rtos”