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

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

“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

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

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

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