ContactManager.CreateContactAsync(PeerNearMe, Object) ContactManager.CreateContactAsync(PeerNearMe, Object) ContactManager.CreateContactAsync(PeerNearMe, Object) Method

Definition

Creates a contact instance for the specified PeerNearMe object.

public:
 void CreateContactAsync(System::Net::PeerToPeer::Collaboration::PeerNearMe ^ peerNearMe, System::Object ^ userToken);
public void CreateContactAsync (System.Net.PeerToPeer.Collaboration.PeerNearMe peerNearMe, object userToken);
member this.CreateContactAsync : System.Net.PeerToPeer.Collaboration.PeerNearMe * obj -> unit

Parameters

peerNearMe
PeerNearMe PeerNearMe PeerNearMe

The PeerNearMe to associate with the new PeerContact instance.

userToken
Object Object Object

A user-defined Object that contains information about the CreateContactAsync(PeerNearMe, Object) operation. It will be passed to the callback of the asynchronous operation for identification.

Exceptions

userToken already exists and is in use.

  • The specified PeerNearMe instance has no endpoints set on it.

Remarks

Calling this method requires a PermissionState of Unrestricted.

Applies to

See also