[2.0] IPC Remoting—Async Delegate Call Status
Hi all,
I'm using IPC remoting to send data between a service and a DLL. This works fine.
I have a list of event subscribers that I loop through to broadcast a message.
This is the code:
Code:
foreach (ClientServiceEventSink sink in _subscribers)
{
ClientRateUpdateHandler pf = sink.InvokeRateUpdated;
pf.BeginInvoke(rateID, type, newValue, new AsyncCallback(onInvokeUpdate), null);
}
The sink object is derived from MarshalByRefObject and created by the client.
Each subscriber has its own named pipe registered using its process ID.
I'd like to modify the code so that I know when a message was unable to be sent due to a client disconnecting.
Using Filemon, I can see that the message is sent and results in a "Pipe Closed" status. How can I programmatically trap this condition?
Cheers,
— P