Events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I’ve wrote a SDK component which send messages to an external party.
I used the following event for that:
public delegate void ReceivedSDKMessageHandler(string adapter, string
message);
public event ReceivedSDKMessageHandler ReceivedSDKMessage;
architecture: Server app-->SDK-->external party.

Now when the external party doesn’t release my event my application will
wait on that. What is the best way to do this without this behavior? Do I
need to create a separate thread?
Please reply with some sample code..

Thanks in advance..
Gaby
 
Gaby,

You can call BeginInvoke on the event member and register an AsyncCallback
(which will call EndInvoke and do any other post-processing you require
relating to your event).

Cheers,
Chris.
 
Back
Top