PeerNearMe::InviteAsync Method (PeerApplication^, String^, array<Byte>^, Object^)
Receives an invitation response from a peer regarding an invitation to a peer collaboration application.
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 |
|
Available since 3.5