View topic - QNX 4 to 6: select, select_receive, tcpip & QNX messages

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

Read-only archive of qnx.rtos (Writing resources managers, and general discussion around the QNX Neutrino RTOS) at inn.qnx.com

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

Postby 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
Mark Dornbush
 

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

Postby 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
Mario Charest
 

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

Postby 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
Mark Dornbush
 

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

Postby rgallen » 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
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm

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

Postby 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
----------------------------------------
Erick Muis
 


Return to qnx.rtos

Who is online

Users browsing this forum: No registered users and 3 guests

cron