Редагувати

Поділитися через


PeerNearMe.InviteAsync Method

Definition

Receives an invitation response from a peer regarding joining a peer collaboration application.

Overloads

InviteAsync(Object)

Receives an invitation response from a peer regarding joining a peer collaboration application.

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

Receives an invitation response from a peer regarding an invitation to a peer collaboration application.

InviteAsync(Object)

Receives an invitation response from a peer regarding joining a peer collaboration application.

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

Parameters

userToken
Object

User-defined object passed to the callback of the asynchronous operation for identification. This required parameter must be unique across all asynchronous invitation operations still in-progress.

Attributes

Exceptions

The PeerApplication object has been disposed.

The userToken argument specifies null.

This PeerApplication object does not specify a valid Guid.

Applies to

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

Receives an invitation response from a peer regarding an invitation to a peer collaboration application.

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);
[<System.Security.SecurityCritical>]
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

Specifies the relevant Peer Collaboration application information represented by a PeerApplication object.

message
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. Size is limited to 16K.

userToken
Object

User-defined object passed to the callback of the asynchronous operation for identification. This required parameter must be unique across all asynchronous invitation operations still in-progress.

Attributes

Exceptions

The PeerApplication object has been disposed.

The applicationToInvite argument specifies null.

The userToken argument specifies null.

  • The endpoint specified by PeerApplication was not found.

  • The applicationToInvite argument specifies an empty Guid.

Applies to