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.

Copy Code
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.

See Also