PeerContact.InviteAsync PeerContact.InviteAsync PeerContact.InviteAsync PeerContact.InviteAsync Method

Definition

Begins an asynchronous invitation operation for an endpoint to join a PeerCollaboration application sponsored by the sender of the invitation.

Overloads

InviteAsync(Object) InviteAsync(Object) InviteAsync(Object) InviteAsync(Object)

Begins an asynchronous invitation operation for an endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object.

InviteAsync(PeerEndPoint, Object) InviteAsync(PeerEndPoint, Object) InviteAsync(PeerEndPoint, Object)

Begins an asynchronous invitation operation for the specified peer endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object.

InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object)

Begins an asynchronous invitation operation for the specified peer endpoints to join the specified collaboration PeerApplication sponsored by the sender of the invitation.

InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object) InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object) InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object)

Begins an asynchronous invitation operation for the specified peerEndPoint to join the specified collaboration PeerApplication sponsored by the sender of the invitation.

Remarks

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

InviteAsync(Object) InviteAsync(Object) InviteAsync(Object) InviteAsync(Object)

Begins an asynchronous invitation operation for an endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object.

public:
 override void InviteAsync(System::Object ^ userToken);
[System.Security.SecurityCritical]
public override void InviteAsync (object userToken);
override this.InviteAsync : obj -> unit
Public Overrides Sub InviteAsync (userToken As Object)

Parameters

userToken
Object Object Object Object

User-defined object to pass to the callback of the asynchronous operation. Also used to identify the asynchronous operation for cancellation. This parameter must be specified and is unique across all asynchronous invitation operations in progress.

Exceptions

Remarks

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

InviteAsync(PeerEndPoint, Object) InviteAsync(PeerEndPoint, Object) InviteAsync(PeerEndPoint, Object)

Begins an asynchronous invitation operation for the specified peer endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object.

public:
 void InviteAsync(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint, System::Object ^ userToken);
[System.Security.SecurityCritical]
public void InviteAsync (System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint, object userToken);
override this.InviteAsync : System.Net.PeerToPeer.Collaboration.PeerEndPoint * obj -> unit

Parameters

peerEndPoint
PeerEndPoint PeerEndPoint PeerEndPoint PeerEndPoint

The endpoint or remote peer to which to send the invitation.

userToken
Object Object Object Object

User-defined object to pass to the callback of the asynchronous operation. Also used to identify the asynchronous operation for cancellation. This parameter must be specified and is unique across all asynchronous invitation operations in progress.

Exceptions

  • UserToken cannot be null.

  • Endpoint in peerEndPoint cannot be null.

The Guid for the current application does not exist or is empty.

Remarks

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object)

Begins an asynchronous invitation operation for the specified peer endpoints to join the specified collaboration PeerApplication sponsored by the sender of the invitation.

public:
 override void InviteAsync(System::Net::PeerToPeer::Collaboration::PeerApplication ^ applicationToInvite, System::String ^ message, cli::array <System::Byte> ^ invitationData, System::Object ^ userToken);
[System.Security.SecurityCritical]
public override void InviteAsync (System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, string message, byte[] invitationData, object userToken);
override this.InviteAsync : System.Net.PeerToPeer.Collaboration.PeerApplication * string * byte[] * obj -> unit
Public Overrides Sub InviteAsync (applicationToInvite As PeerApplication, message As String, invitationData As Byte(), userToken As Object)

Parameters

applicationToInvite
PeerApplication PeerApplication PeerApplication PeerApplication

The application for which the invitation is sent.

message
String String String String

A message to send to the remote peer along with the application invitation. The message can be no more than 255 Unicode characters.

invitationData
Byte[]

A user-defined data blob to associate with the invitation. Its size can be no more than 16,384 bytes.

userToken
Object Object Object Object

User-defined object to pass to the callback of the asynchronous operation. Also used to identify the asynchronous operation for cancellation. This parameter must be specified and is unique across all asynchronous invitation operations in progress.

Exceptions

  • The Guid for the current application does not exist or is empty.

  • Endpoint collection is empty or null.

Remarks

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object) InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object) InviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object)

Begins an asynchronous invitation operation for the specified peerEndPoint to join the specified collaboration PeerApplication sponsored by the sender of the invitation.

public:
 void InviteAsync(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint, System::String ^ message, cli::array <System::Byte> ^ invitationData, System::Net::PeerToPeer::Collaboration::PeerApplication ^ applicationToInvite, System::Object ^ userToken);
[System.Security.SecurityCritical]
public void InviteAsync (System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint, string message, byte[] invitationData, System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, object userToken);
override this.InviteAsync : System.Net.PeerToPeer.Collaboration.PeerEndPoint * string * byte[] * System.Net.PeerToPeer.Collaboration.PeerApplication * obj -> unit

Parameters

peerEndPoint
PeerEndPoint PeerEndPoint PeerEndPoint PeerEndPoint

The endpoint or remote peer to which to send the invitation.

message
String String String String

A message to send to the remote peer along with the application invitation. The message can be no more than 255 Unicode characters.

invitationData
Byte[]

A user defined data blob to associate with the invitation. Its size can be no more than 16,384 bytes.

applicationToInvite
PeerApplication PeerApplication PeerApplication PeerApplication

The application for which the invitation is sent.

userToken
Object Object Object Object

User-defined object to pass to the callback of the asynchronous operation. Also used to identify the asynchronous operation for cancellation. This parameter must be specified and is unique across all asynchronous invitation operations in progress.

Exceptions

  • UserToken cannot be null.

  • Endpoint specified by peerEndPoint cannot be null.

The Id for the current application does not exist or is empty.

Remarks

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

Applies to