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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top