Peer.Invite Method

Definition

Sends an invitation to a Peer to start a specific PeerApplication.

Overloads

Invite(PeerApplication, String, Byte[])

Sends an invitation to a Peer to start a specific PeerApplication.

Invite()

Sends an invitation to a Peer to start a specific PeerApplication.

Invite(PeerApplication, String, Byte[])

Sends an invitation to a Peer to start a specific PeerApplication.

C#
public abstract System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite(System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, string message, byte[] invitationData);

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 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.

Returns

A PeerInvitationResponse from the peer that received the invitation.

Exceptions

The application is not registered for collaboration.

invitationData is larger than 16,384 bytes.

  • An error occurred during the invitation process.

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

Remarks

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

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Invite()

Sends an invitation to a Peer to start a specific PeerApplication.

C#
public abstract System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite();

Returns

A PeerInvitationResponse from the peer that received the invitation.

Exceptions

  • An error occurred during the invitation process.

  • The currently executing application is not registered with the Peer 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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1