Package eu.woolplatform.utils.bluetooth
Interface BluetoothServerSocket
-
public interface BluetoothServerSocketA Bluetooth server socket is used to provide a service on the local Bluetooth device to other devices.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BluetoothSocketaccept()Waits for a remote Bluetooth device to connect to this server socket.BluetoothSocketaccept(int timeout)Waits for a remote Bluetooth device to connect to this server socket.voidclose()Closes this server socket.
-
-
-
Method Detail
-
accept
BluetoothSocket accept() throws IOException
Waits for a remote Bluetooth device to connect to this server socket. This method blocks until a remote device connects. Then it returns a Bluetooth socket that can be used to communicate with the remote device. This method waits for indefinite time.- Returns:
- the Bluetooth socket
- Throws:
IOException- if an error occurs while waiting
-
accept
BluetoothSocket accept(int timeout) throws IOException
Waits for a remote Bluetooth device to connect to this server socket. This method blocks until a remote device connects. Then it returns a Bluetooth socket that can be used to communicate with the remote device. This method waits no longer than the specified timeout.- Parameters:
timeout- the timeout in seconds- Returns:
- the Bluetooth socket
- Throws:
IOException- if an error occurs while waiting
-
close
void close()
Closes this server socket.
-
-