Share via


WiFiDirectServiceAdvertiser.ConnectAsync Method

Definition

Overloads

ConnectAsync(DeviceInformation)

Accepts a session request without requiring a PIN.

ConnectAsync(DeviceInformation, String)

Accepts a session request by connecting with the given PIN.

ConnectAsync(DeviceInformation)

Accepts a session request without requiring a PIN.

public:
 virtual IAsyncOperation<WiFiDirectServiceSession ^> ^ ConnectAsync(DeviceInformation ^ deviceInfo) = ConnectAsync;
/// [Windows.Foundation.Metadata.Overload("ConnectAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<WiFiDirectServiceSession> ConnectAsync(DeviceInformation const& deviceInfo);
[Windows.Foundation.Metadata.Overload("ConnectAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<WiFiDirectServiceSession> ConnectAsync(DeviceInformation deviceInfo);
function connectAsync(deviceInfo)
Public Function ConnectAsync (deviceInfo As DeviceInformation) As IAsyncOperation(Of WiFiDirectServiceSession)

Parameters

deviceInfo
DeviceInformation

Describes the device to be connected. Pass in the WiFiDirectServiceSessionRequestedEventArgs.DeviceInformation property value.

Returns

An asynchronous connection operation. On successful completion, returns an object that describes the session that has been created.

Attributes

See also

Applies to

ConnectAsync(DeviceInformation, String)

Accepts a session request by connecting with the given PIN.

public:
 virtual IAsyncOperation<WiFiDirectServiceSession ^> ^ ConnectAsync(DeviceInformation ^ deviceInfo, Platform::String ^ pin) = ConnectAsync;
/// [Windows.Foundation.Metadata.Overload("ConnectAsyncWithPin")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<WiFiDirectServiceSession> ConnectAsync(DeviceInformation const& deviceInfo, winrt::hstring const& pin);
[Windows.Foundation.Metadata.Overload("ConnectAsyncWithPin")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<WiFiDirectServiceSession> ConnectAsync(DeviceInformation deviceInfo, string pin);
function connectAsync(deviceInfo, pin)
Public Function ConnectAsync (deviceInfo As DeviceInformation, pin As String) As IAsyncOperation(Of WiFiDirectServiceSession)

Parameters

deviceInfo
DeviceInformation

Describes the device to be connected. Pass in the WiFiDirectServiceSessionRequestedEventArgs.DeviceInformation property value.

pin
String

Platform::String

winrt::hstring

The PIN to be used to configure the session.

Returns

An asynchronous connection operation. On successful completion, returns an object that describes the session that has been created.

Attributes

See also

Applies to