WiFiDirectConnectionListener Class

Definition

Class used to listen for incoming Wi-Fi Direct connection requests.

public ref class WiFiDirectConnectionListener sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WiFiDirectConnectionListener final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class WiFiDirectConnectionListener final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WiFiDirectConnectionListener
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class WiFiDirectConnectionListener
function WiFiDirectConnectionListener()
Public NotInheritable Class WiFiDirectConnectionListener
Inheritance
Object Platform::Object IInspectable WiFiDirectConnectionListener
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

If multiple apps are listening for ConnectionRequested event notifications, the notifications will be sent to the apps sequentially in last in first out order of when the apps registered the event handler.

This class is similar to the StreamSocketListener class in the Windows.Networking.Sockets namespace. When it sees an incoming request of the appropriate kind, it raises a ConnectionRequested event.

Constructors

WiFiDirectConnectionListener()

Creates a new WiFiDirectConnectionListener object.

Events

ConnectionRequested

Notification on an incoming Wi-Fi Direct connection request.

Applies to

See also