Programming Patterns with Session Objects

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.

The general programming patterns in working with sessions is as follows:

  • Create an outgoing session using the session manager and register for interested session events.
  • Invite a user to join the session by creating a participant and adding it to the session. An application must also register for any interested participant events.
  • For an audio/video session, a client must also enable media channels between the local and remote participants before adding the remote participant object to the session. Enabling a media channel amounts to creating an audio or video channel, adding it to the invited participant object, and then handling and registering for interested media channel events.
  • Accept an incoming session by handling the OnIncomingSession event. Also, register interested session events on the incoming session object.
  • End a session by calling the Terminate method on the session object.
  • For a conference session, a client calls the Enter method to let the local participant join the conference. A participant can leave the conference by calling the Leave method.

See Also

Concepts

Session Types
Session Creation
Session Participants
Channels in Media Sessions