QnxNews <situelectro@vsnl.com> wrote:
hi,
my application is receiving data from couple of other applications. this
data is send to my application either through Send() or through proxy. now i
need to detach the proxy send by other application after my application
receives it.
but how to find that the data received by my application using Receive ()
function is sent by other application using Send () or using proxy?
Hm… this sounds like you are doing something which is not recommended.
Proxies are NOT intended as a data-carrying method, but as a signalling
method. You should not be attaching proxies to another process.
That is, when you call qnx_proxy_attach(), the first parameter (pid)
should always be passed as 0, meaning attach the proxy to my process.
Then, if someone else is to trigger it, you pass this proxy id to that
process so that they can notify you that something happened.
If you need to move data, you should use a Send/Receive/Reply.
Use qnx_proxy_attach(someone_else, data, sizeof(data)); Trigger(proxy);
to send data is both incredibly in-effecient, will NOT work accross
the netowrk, and causes the architectural/design problem that you’ve
just encountered.
If you need to move data in a non-blocking manner, a better architecture
to look at is inverting the S/R/R direction, and moving the data with
a Reply().
That is, A wants to move data to B, but not end up Send/Reply blocked.
A triggers a proxy B has setup, B Sends to A with a “get data” message,
A Replies with the data. B has not made a blocking call.
-David
QNX Training Services
I do not answer technical questions by email.