B2G/Bluetooth/WebBluetooth-v2/BluetoothServerSocket

From MozillaWiki
< B2G‎ | Bluetooth‎ | WebBluetooth-v2
Revision as of 07:00, 5 March 2015 by Jamin Liu (talk | contribs) (→‎Properties: Properties of BluetoothServerSocket)
Jump to navigation Jump to search
  • Under Construction *

Overview

BluetoothServerSocket is a listening socket which is used to listen incoming RFCOMM connection.

Interfaces

BluetoothServerSocket

[CheckPermissions="bluetoothSocket"]
interface BluetoothServerSocket: EventTarget
{
  [NewObject, Throws] Promise<BluetoothSocket> listen()
  readonly attribute DOMString serviceUuid;
  readonly attribute DOMString? serviceName;
           attribute EventHandler onclose;   // DOMString aErrorMsg

  [NewObject, Throws] Promise<void> close();
};

Properties

serviceUuid

Description
The UUID of Bluetooth service this server socket expected to accept for.
Value type
DOMString
Default value
Empty string ("")

serviceName

Description
The service name this server socket expected to accept for.
Value type
DOMString
Default value
Empty string ("")

Event Handlers

Methods

See Also