Handling Remote Events
Microsoft included an example of using events in .NET Remoting in the help documentation at ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconremotingexampledelegatesevents.htm. (You can open this help topic by browsing to the referenced link in Internet Explorer or the URL control of the Web toolbar in the VS .NET IDE.) The example is a simple console-based, chat example that permits clients to communicate through a Singleton object. Rather than repeat that code here (and because I thought the example was fun), I include a WinForms-based version that is slightly more advanced and a lot of fun to play with. Here is the basic idea.
Recall that we talked about Singleton remoted objects. When we create a Singleton MarshalByRefObject ...
Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.