Share via


Receiving an Incoming Signaling Session

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.

Receiving an incoming session involves the following steps:

  • Registering with an endpoint for the SessionReceived events.
  • Implementing an event handler to handle the incoming session dispatched from a SessionReceived event.

Registering for SessionReceived Events

The following code example shows how to register with an endpoint to receive SessionReceived events.

RealTimeEndpoint endpoint = ...; // Assumed to be created elsewhere
endpoint.SessionReceived += new EventHandler<SessionReceivedEventArgs>(OnSessionReceived);

Handling the Event to Receive an Incoming Session

The following code example shows how to implement a handler for the SessionReceived event.

void OnSessionReceived(object sender, SessionReceivedEventArgs e)
{
  SignalingSession session = e.Session;
  // Additional code
}

In production code, you should examine the session headers to ensure that the correct session is received.

See Also

Concepts

Creating an Outgoing Signaling Session

Other Resources

Creating a Real-Time Endpoint