@Implements(android.bluetooth.BluetoothServerSocket.class) public class ShadowBluetoothServerSocket extends Object
| Constructor | Description |
|---|---|
ShadowBluetoothServerSocket() |
| Modifier and Type | Method | Description |
|---|---|---|
protected BluetoothSocket |
accept(int timeout) |
May block the current thread and wait until
BluetoothDevice is offered via
deviceConnected(BluetoothDevice) method or timeout occurred. |
protected void |
close() |
|
BluetoothSocket |
deviceConnected(BluetoothDevice device) |
Creates
BluetoothSocket for the given device and makes this socket available
immediately in the accept(int) method. |
static BluetoothServerSocket |
newInstance(int type,
boolean auth,
boolean encrypt,
ParcelUuid uuid) |
public static BluetoothServerSocket newInstance(int type, boolean auth, boolean encrypt, ParcelUuid uuid)
@Implementation protected BluetoothSocket accept(int timeout) throws IOException
BluetoothDevice is offered via
deviceConnected(BluetoothDevice) method or timeout occurred.IOException - if socket has been closed, thread interrupted while waiting or timeout has
occurred.@Implementation protected void close() throws IOException
IOExceptionpublic BluetoothSocket deviceConnected(BluetoothDevice device)
BluetoothSocket for the given device and makes this socket available
immediately in the accept(int) method.