Windows Peer-to-Peer Sample Applications

Feedback

The following sample applications are included in the Platform SDK. The samples can help you when you develop your own Peer-to-Peer applications using the Peer-to-Peer Infrastructure.

·         Collaboration Sample

·         Distributed Routing Table Sample

·         Graph Chat Sample

·         Group Chat Sample

·         Peer Name Resolution Protocol Sample

 

Tip: To enable the Peer to Peer Networking components on XP follow the guidelines at http://www.microsoft.com/technet/network/p2p/p2pintro.mspx.

If you have any questions or feedback, please contact us using any of the mechanisms below:

Email: peerfb@microsoft.com
Website: http://www.microsoft.com/p2p
Blog: http://blogs.msdn.com/p2p/
MSDN Forum: http://forums.microsoft.com/msdn/showforum.aspx?forumid=1505&siteid=1


Collaboration Sample

The Collaboration sample is a console based application. The goal of the application is to demonstrate proper use of the Collaboration APIs. Specifically, it demonstrates how to:

·         Sign In, Sign Out and display Sign In Options

·         Set and get your endpoint name

·         Display endpoint information

·         Enumerate People Near Me

·         Add a People Near Me endpoint to contacts

·         Export, Parse, Import and Delete contacts

·         Enumerate contacts

·         Watch a contact's presence changes

·         Give a contact permission to watch you for presence changes

·         Get presence information for an endpoint

·         Set your presence information

·         Subscribe and Unsubscribe from an endpoint

·         Publish an object and stop publishing an object

·         Register and Unregister a application for collaboration

·         Display applications registered for collaboration

·         Send an Invitation to an endpoint to participate in a collaboration session

·         Upon accepting an invite launch a collaboration session and access data sent with the invitation

Distributed Routing Table Sample

The Distributed Routing Table (DRT) sample is a console based application that demonstrates the use of the DRT APIs. Specifically, it demonstrates how to:

·         Register DRT Keys

·         Search for DRT keys

·         Process DRT events

·         Use DRT providers

Graph Chat Sample

The Graph Chat Sample Application is a simple chat application demonstrating how to use the Peer-to-Peer Graphing API. The XP version demonstrates how to use the Peer Name Resolution Protocol (PNRP) with the Winsock2 API. Any address provider can be used. The Vista version demonstrates how to use the PNRP via the PNRP APIs. More specifically, the application demonstrates:

·         Creating a graph

·         Connecting to an existing graph

·         Disconnecting from an existing graph

·         Enumerating Peer-to-Peer entities

·         Adding records to the graph

·         Using direct connections with a graph

·         Using the notification and event infrastructure with graphs

·         Registering names with PNRP

·         Resolving names with PNRP

·         Unregistering names with PNRP

Group Chat Sample

The Group Chat Sample Application is a simple chat application demonstrating how to use the Peer-to-Peer Grouping and Identity Manager API. More specifically the application demonstrates:

·         Creating an identity

·         Creating and obtaining identity information

·         Enumerating identities

·         Enumerating groups associated with an identity

·         Creating a group

·         Creating invitations for a group

·         Connecting to an existing group

·         Disconnecting from an existing group

·         Extracting information from the group properties

·         Using direct connections with a group

·         Using the enumeration functions within a group

·         Enumerating group members

·         Adding records to a group

·         Using the notification and event infrastructure with groups

Peer Name Resolution Protocol Sample

The Peer Name Resolution Protocol (PNRP) sample is a console based application. The goal of the application is to demonstrate proper use of the PNRP APIs. Specifically, it demonstrates how to: