NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Chat Sample

The purpose of this sample is to introduce developers to delegates and events. Delegates and events are a type-safe method callback mechanism. The sample declares a “chat” server type that multiple “clients” can connect to. Each client registers a delegate (callback method) with the server. Then, when one client sends a string message to the server, the server forwards the message to all registered clients. This code has two implementations. The first uses delegates showing low-level callback mechanism. The second implementation uses events showing how events hide most of the low-level goo associated with delegates.

Location of the Sample

This sample list located in the Chat directory of the NGWS SDK sample directories.

For Example:

C:\Program Files\NGWSSDK\Samples\Chat

Building the Sample

In order to properly build and run this sample, the following steps need to be performed prior to building and running the sample…

Running the Sample

In order to run this sample, follow the instructions listed below.