共用方式為


WiFiDirectConnectionListener 類別

定義

用來接聽傳入Wi-Fi直接連線要求的類別。

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
繼承
Object Platform::Object IInspectable WiFiDirectConnectionListener
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

如果多個應用程式正在接聽 ConnectionRequested 事件通知,當應用程式註冊事件處理常式時,會依序將通知依序傳送至應用程式。

這個類別類似于Windows.Networking.Sockets命名空間中的StreamSocketListener類別。 當它看到適當類型的傳入要求時,會引發 ConnectionRequested 事件。

建構函式

WiFiDirectConnectionListener()

建立新的 WiFiDirectConnectionListener 物件。

事件

ConnectionRequested

傳入Wi-Fi直接連線要求的通知。

適用於

另請參閱