Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Queston about "MsgDeliverEvent": (2 Items)
   
Queston about "MsgDeliverEvent"  
Dear Experts.

I have a few questions. 

1. 
The sample code in QNX manual about MsgDeliverEvent() shows that "MsgReceivePulse" is used in client side to get event 
from server.  please refer to the sample code below:
http://www.qnx.com/developers/docs/6.3.2/neutrino/lib_ref/m/msgdeliverevent.html

Isn't it much easier to use "SignalWaitinfo" insteand of "MsgReceivePulse"?
What is difference between "SignalWaitinfo" and "MsgReceivePulse"
and what is the relation between "signal" and "pulse" in QNX neutrino? Does pulse is implemented by using "signal" or 
vice vesa  in QNX neutrino?

2. 
Once server get "rcvid" for a client, could this "rcvid" be used to call "MsgDeliverEvent" multi-times ? Or does it 
become invalid once "MsgDeliverEvent" is called?   I means, could Server keep use this "rcvid" to trigger MsgSend from 
client?  Does  "rcvid" value of client A is fixed as long as client A alive? or Is it changed whenever client A send a 
message ?

3. Is thereany issue if  I use MsgSendPulse/MsgSendReceive instead of  MsgDeliverEvent/SignalWaitinfo to trigger MsgSend
 from client ?

Thanks,
Dooeui
Re: Queston about "MsgDeliverEvent"  
Hope I imagined/guessed your doubts the right way..

> 
> Isn't it much easier to use "SignalWaitinfo" insteand of "MsgReceivePulse"?
> What is difference between "SignalWaitinfo" and "MsgReceivePulse"
> and what is the relation between "signal" and "pulse" in QNX neutrino? Does 
> pulse is implemented by using "signal" or vice vesa  in QNX neutrino?
> 
Perhaps this clears you doubts:
http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/s/sigevent.html

> 2. 
> Once server get "rcvid" for a client, could this "rcvid" be used to call "
> MsgDeliverEvent" multi-times ?
Yes.

>Or does it become invalid once "MsgDeliverEvent
> " is called?  
No. except by programmer's fault ?

> I means, could Server keep use this "rcvid" to trigger MsgSend 
> from client?
If the client does have a I-let-me-trigger-routine for doing so, yes.

>  Does  "rcvid" value of client A is fixed as long as client A 
> alive? 

I think that rcvid is client-unique, but depends on the channel the client called ConnectAttach() on. 

(a client could have done :
coid1=ConnectAttach(chid1..
coid2=ConnectAttach(chid2..

MsgSend(coid1...)
MsgSend(coid2...)

results in rcvid1=3 and rcvid2=4 on server side)

 
>or Is it changed whenever client A send a message ?
no.

> 
> 3. Is thereany issue if  I use MsgSendPulse/MsgSendReceive instead of  
> MsgDeliverEvent/SignalWaitinfo to trigger MsgSend from client ?
> 

???
The issue is mostly the design of the msg-passing interface, where imho signals should be used in trad-unix way, this 
doesn't mean that you cannot do it the other way around.

> Thanks,
> Dooeui

Hope this helps.
-Jeevan