Table of Contents

Class BluetoothRemoteGATTServer

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The BluetoothRemoteGATTServer interface of the Web Bluetooth API represents a GATT
Server on a remote device.
[Value("BluetoothRemoteGATTServer")]
public class BluetoothRemoteGATTServer
Inheritance
BluetoothRemoteGATTServer
Inherited Members

Remarks

Constructors

BluetoothRemoteGATTServer()

public BluetoothRemoteGATTServer()

Properties

Connected

NOTE
Experimental
The BluetoothRemoteGATTServer.connected read-only
property returns a boolean value that returns true while this script execution
environment is connected to this.device. It can be false while the user
agent is physically connected.
[Value("connected")]
public bool Connected { get; }

Property Value

bool

A boolean.

Remarks

Device

NOTE
Experimental
The BluetoothRemoteGATTServer.device read-only property
returns a reference to the BluetoothDevice running the server.
[Value("device")]
public BluetoothDevice Device { get; }

Property Value

BluetoothDevice

A reference to the BluetoothDevice.

Remarks

Methods

Connect()

NOTE
Experimental
The
BluetoothRemoteGATTServer.connect() method causes the
script execution environment to connect to this.device.
[Value("connect")]
public Task<BluetoothRemoteGATTServer> Connect()

Returns

Task<BluetoothRemoteGATTServer>

A {{jsxref("Promise")}} that resolves to a BluetoothRemoteGATTServer.

Remarks

Disconnect()

NOTE
Experimental
The BluetoothRemoteGATTServer.disconnect() method causes
the script execution environment to disconnect from this.device.
[Value("disconnect")]
public GlobalObject.Undefined Disconnect()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

GetPrimaryService(Union176)

NOTE
Experimental
The BluetoothRemoteGATTServer.getPrimaryService() method
returns a promise to the primary BluetoothRemoteGATTService offered by the
Bluetooth device for a specified bluetooth service UUID.
[Value("getPrimaryService")]
public Task<BluetoothRemoteGATTService> GetPrimaryService(Union176 service)

Parameters

service Union176

Returns

Task<BluetoothRemoteGATTService>

A {{jsxref("Promise")}} that resolves to a BluetoothRemoteGATTService object.

Remarks

GetPrimaryServices(Union176)

NOTE
Experimental
The BluetoothRemoteGATTServer.getPrimaryServices() method returns a
promise to a list of primary BluetoothRemoteGATTService objects offered by the
Bluetooth device for a specified BluetoothServiceUUID.
[Value("getPrimaryServices")]
public Task<List<BluetoothRemoteGATTService>> GetPrimaryServices(Union176 service = default)

Parameters

service Union176

Returns

Task<List<BluetoothRemoteGATTService>>

A {{jsxref("Promise")}} that resolves to a list of BluetoothRemoteGATTService
objects.

Remarks