PeerContact::Invite Method (PeerEndPoint^)

 

Sends an invitation to a specific endpoint to join into peer collaboration with the sender of the invitation.

Namespace:   System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public:
[SecurityCriticalAttribute]
PeerInvitationResponse^ Invite(
	PeerEndPoint^ peerEndPoint
)

Parameters

peerEndPoint
Type: System.Net.PeerToPeer.Collaboration::PeerEndPoint^

The endpoint to receive the invitation.

Return Value

Type: System.Net.PeerToPeer.Collaboration::PeerInvitationResponse^

A PeerInvitationResponse from the peer endpoint who received the invitation.

Exception Condition
ArgumentNullException

PeerEndPoint cannot be null.

ObjectDisposedException

The PeerEndPoint object has been disposed.

PeerToPeerException
  • Unable to complete Invite operation.

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

  • EndPoint specified by PeerEndPoint object is not valid.

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:

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

.NET Framework
Available since 3.5
Return to top
Show: