About the System.Net.PeerToPeer.Collaboration Namespace

The System.Net.PeerToPeer.Collaboration namespace provides classes and APIs that are used to implement peer collaboration activities using the Peer-to-Peer Collaboration Infrastructure.

Classes

The main classes used in the implementation of a Peer-to-Peer Collaboration activity are:

  • The ContactManager, which can be used to store peer contacts.

  • The PeerApplication in which to collaborate, such as a game, chat client, or conferencing solution.

  • The peers that will be collaborating in an activity. These peers can be represented as PeerContact, PeerNearMe, or PeerEndPoint objects.

  • The static PeerCollaboration class itself, which specifies which applications are available and which peers are participating in them.

The Invite methods are used to invite peers to a collaboration session. A calling peer can subscribe to another peer for events that signal updates to application, object, or presence information affiliated with the collaboration session. Presence classes specify whether a Peer is available for collaboration, and the PeerScope class is used to specify how much participation is allowed for a peer: Internet (global), NearMe, (subnet) or None.

A collaboration session is comprised of four steps:

  • Discovery. Discover or publish applications, peers, and presence information. For instance, find other people on the local subnet that have the same games installed.

  • Invitation. Send and accept secure invitations for remote peer(s) to start or join PeerCollaboration sessions.

  • Contact Management. Add discovered peers as a contact to a ContactManager.

  • Communication. When communication is established, use the System.Net APIs, the System.Net.PeerToPeer API, or the Windows Communication Foundation Peer Channel classes for multiparty communications.

For example, the host peer starts a collaboration session, and utilizes the CreateContact method to add a remote peer and one of its local peers to the Contact Manager of the host peer. The three users will then participate in their own private collaboration session.

Typical P2P applications are: conference calls for collaborative note-taking or whiteboarding, serverless chat applications, interactive advertisements, and online gaming sessions.

See also