Edit

Share via


Peer.InviteAsync Method

Definition

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

Overloads

InviteAsync(Object)

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

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

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

InviteAsync(Object)

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

public:
 abstract void InviteAsync(System::Object ^ userToken);
public abstract void InviteAsync (object userToken);
abstract member InviteAsync : obj -> unit
Public MustOverride Sub InviteAsync (userToken As Object)

Parameters

userToken
Object

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

Exceptions

userToken is null.

  • An error occurred during the invitation process.

  • The currently executing application is not registered with the collaboration infrastructure.

Remarks

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

See also

Applies to

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

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

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

Parameters

applicationToInvite
PeerApplication

The PeerApplication for which the invitation is sent.

message
String

A message to send to the remote peer along with the application invitation. The maximum size of this message is 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

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

Exceptions

The application is not registered with the collaboration infrastructure.

userToken is null.

invitationData is larger than 16,384 bytes.

  • An error occurred during the invitation process.

  • The currently executing application is not registered with the collaboration infrastructure.

Remarks

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

See also

Applies to