PeerNearMe::Invite Method (PeerApplication^, String^, array<Byte>^)

 

Sends an invitation to join a peer collaboration application to a remote peer that includes data that describes or specifies the application invite.

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

public:
[SecurityCriticalAttribute]
virtual PeerInvitationResponse^ Invite(
	PeerApplication^ applicationToInvite,
	String^ message,
	array<unsigned char>^ invitationData
) override

Parameters

applicationToInvite
Type: System.Net.PeerToPeer.Collaboration::PeerApplication^

Specifies the relevant Peer Collaboration application represented by a PeerApplication instance.

message
Type: System::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
Type: array<System::Byte>^

A user defined data blob to associate with the invitation. Size is limited to 16K (16,384 bytes).

Return Value

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

PeerInvitationResponse object containing the relevant PeerInvitationResponseType value specified by the remote peer.

Exception Condition
ObjectDisposedException

The PeerApplication object has been disposed.

ArgumentNullException

The applicationToInvite argument specifies null.

PeerToPeerException

.NET Framework
Available since 3.5
Return to top
Show: