B2G/Bluetooth/WebBluetooth-v2/BluetoothSocket: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
m (Fix internal link of BluetoothSocketState) |
(→Overview: Overview of BluetoothSocket) |
||
| Line 2: | Line 2: | ||
== Overview == | == Overview == | ||
BluetoothSocket is used to send and receive data to Bluetooth devices using RFCOMM connections. | |||
== Interfaces == | == Interfaces == | ||
Revision as of 08:20, 5 March 2015
- Under Construction *
Overview
BluetoothSocket is used to send and receive data to Bluetooth devices using RFCOMM connections.
Interfaces
BluetoothSocket
[CheckPermissions="bluetoothSocket"]
interface BluetoothSocket: EventTarget
{
readonly attribute BluetoothSocketState state;
readonly attribute DOMString serviceUuid;
readonly attribute DOMString address;
attribute EventHandler onmessage; // ArrayBuffer aData
attribute EventHandler onclose; // DOMString aErrorMsg
attribute EventHandler onconnect;
[NewObject, Throws] Promise<void> send(ArrayBuffer aData); [NewObject, Throws] Promise<void> close(); };
BluetoothSocketState
[CheckPermissions="bluetoothSocket"]
enum BluetoothSocketState
{
"connecting",
"open",
"closing",
"closed"
};