RfcommServiceProvider 类

定义

表示本地 RFCOMM 服务的实例。

public ref class RfcommServiceProvider sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RfcommServiceProvider final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RfcommServiceProvider final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RfcommServiceProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RfcommServiceProvider
Public NotInheritable Class RfcommServiceProvider
继承
Object Platform::Object IInspectable RfcommServiceProvider
属性

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 中引入)
应用功能
bluetooth

注解

版本历史记录

Windows 版本 SDK 版本 增值
1511 10586 StartAdvertising (StreamSocketListener,布尔)

属性

SdpRawAttributes

获取用于播发的 SDP 属性的集合。

ServiceId

获取此本地 RFCOMM 服务实例的 RfcommServiceId。

方法

CreateAsync(RfcommServiceId)

从 RFCOMM 服务实例的 RfcommServiceId 获取 RfcommServiceProvider 对象。

StartAdvertising(StreamSocketListener, Boolean)

开始播发 SDP 属性。

StartAdvertising(StreamSocketListener)

开始播发 SDP 属性。

StopAdvertising()

停止播发 SDP 属性。

适用于