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

 

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

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

public:
[SecurityCriticalAttribute]
virtual void InviteAsync(
	PeerApplication^ applicationToInvite,
	String^ message,
	array<unsigned char>^ invitationData,
	Object^ userToken
) override

Parameters

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

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

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.

userToken
Type: System::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.

Exception Condition
ObjectDisposedException

The PeerApplication object has been disposed.

ArgumentNullException

The applicationToInvite argument specifies null.

ArgumentException

The userToken argument specifies null.

PeerToPeerException
  • The endpoint specified by PeerApplication was not found.

  • The applicationToInvite argument specifies an empty Guid.

.NET Framework
Available since 3.5
Return to top
Show: