QNX4 to QNX6 simple IPC?

In QNX4, when sending a message to a server process, all you need is the
PID of that server. (Which you can find with qnx_locate) Then you can use
the MsgSend(pid, etc) function.

What I would like to know is in QNX6, is there something comparable to the
qnx_locate that would enable me to find the CHIDs of a given processus? So
then I could use MsgSend(chid,…)

Sorry for the newbie question…

Thank you!

“thejolyman” <thejolyman@caramail.com> wrote in message
news:Xns9191ABE32E0CBthejolyman19hotmailR@64.26.141.46

In QNX4, when sending a message to a server process, all you need is the
PID of that server. (Which you can find with qnx_locate) Then you can use
the MsgSend(pid, etc) function.

What I would like to know is in QNX6, is there something comparable to the
qnx_locate that would enable me to find the CHIDs of a given processus? So
then I could use MsgSend(chid,…)

Check the name_* series of function

Sorry for the newbie question…

Thank you!

thejolyman <thejolyman@caramail.com> wrote:

What I would like to know is in QNX6, is there something comparable to the
qnx_locate that would enable me to find the CHIDs of a given processus? So
then I could use MsgSend(chid,…)

You don’t send messages to channel ids… you send messages to connections.

client - connection → channel - server

A client gets a connection to a channel in a server.

name_attach() will allow a server to register a name.
name_open() will give you a connection to that server, which you can
send to.

They are the closest replacement for the qnx_name_attach() and
qnx_name_locate() pair.

-David

QNX Training Services
I do not answer technical questions by email.

“Jean-Francois Joly” <thejolyman19@hotmailremoveme.com> wrote:

You don’t send messages to channel ids… you send messages to
connections.

client - connection → channel - server

Nice, the concept is getting a lot more clearer now…!

This brings me to an another question… ChannelCreate() returns a chid
because it is on the server side. MsgReceive uses this chid but also
returns a receive-id. (Which MsgReply() uses) Why can’t MsgReply use the
chid again instead of the receive-id, whatever that might be? Seems logic
to send back the reply to the channel id, no?

In case of multiple threads, and multiple clients, the received ID really
identifies which client is blocked. For example, if a server receives
requests from 10 different clients, but doesn’t reply to them, the server
will have 10 different receive IDs. When the server does do the MsgReply,
the receive ID identifies which client the server is replying to.

And when you throw in threads on the client side, the argument is even stronger.

Cheers,
-RK

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Consulting and Training at www.parse.com
Email my initials at parse dot com.