Export (0) Print
Expand All

Subscribing to Signaling Session Events

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Subscribing to an event raised by a signaling session object involves registering an event handler with the session object and implementing a handler for the event.

The following code example illustrates the programming pattern for handling the signaling session events. It uses an example that subscribes to the MessageReceived event raised by a signaling session.

SignalingSession session = ...; // Assumed to be created elsewhere

// Register the event handler
session.MessageReceived += this.OnMessageReceived;

// Implement the event handler
void OnMessageReceived(object sender, 
                       MessageReceivedEventArgs args)
{
  // Handle the received message.
}

An application can subscribe to other events raised by a signaling session in the same fashion.

Community Additions

ADD
Show:
© 2014 Microsoft