Implementing Aysnchronous Methods in Remoting Applications
Implementing Asynchronous Methods inRemoting Applns.
April 7, 2004
Implementing Asynchronous Methods in Remoting Applns.
Introduction
Implementing asynchronous programming in remoting applications is similar to implementing asynchronous programming in a single application domain or context. You just need to configure asynchronous method calls according to the requirements of .NET Remoting.
Point to Remember
When implementing asynchronous programming in a .NET Remoting application the following points are considered,
The caller decides whether a particular remote call is asynchronous.
Remote types do not have to support asynchronous behavior by their clients.
Need to complete type safety.
Must use the System.Threading objects appropriately to wait or synchronize your methods.
Steps Involved
To complete the asynchronous programming in remote application, complete the following steps:
1. Create an instance of an object that can receive a remote call to a method.
2. Wrap that instance method with an AsyncDelegate method.
3. Wrap the remote method with another delegate.
4. Call the BeginInvoke method on the second delegate, passing any arguments, the AsyncDelegate method, and some object to hold the state.
5. Wait for the server object to call your callback method.
Code Sample
C#
VB.NET
Read more about:
MicrosoftAbout the Author
You May Also Like