public abstract class RfcommServer
- Object
- RfcommServer
A listening RFCOMM endpoint (SPP server) registered with the local SDP
database via
BluetoothClassic.listen(String, BluetoothUuid, boolean).Constructors
protected RfcommServer(BluetoothUuid serviceUuid) | Constructed by ports; not application API. |
Methods
public abstract AsyncResource<RfcommConnection> accept() | Resolves with the next incoming RfcommConnection. |
public abstract void close() | Stops listening; pending accept() calls fail with BluetoothError.IO_ERROR. |
public BluetoothUuid getServiceUuid() | The service UUID this server was registered under. |
Inherited methods
Constructor details
RfcommServer
protected RfcommServer(BluetoothUuid serviceUuid)Constructed by ports; not application API.
Method details
accept
public abstract AsyncResource<RfcommConnection> accept()Resolves with the next incoming
RfcommConnection. Call again
after each resolution to accept further clients.close
public abstract void close()Stops listening; pending
accept() calls fail with
BluetoothError.IO_ERROR.getServiceUuid
public BluetoothUuid getServiceUuid()The service UUID this server was registered under.