BluetoothServerSocket.Accept Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Accept() |
Block until a connection is established. |
Accept(Int32) |
Block until a connection is established, with timeout. |
Accept()
Block until a connection is established.
[Android.Runtime.Register("accept", "()Landroid/bluetooth/BluetoothSocket;", "")]
public Android.Bluetooth.BluetoothSocket? Accept ();
[<Android.Runtime.Register("accept", "()Landroid/bluetooth/BluetoothSocket;", "")>]
member this.Accept : unit -> Android.Bluetooth.BluetoothSocket
Returns
a connected BluetoothSocket
- Attributes
Exceptions
on error, for example this call was aborted, or timeout
Remarks
Block until a connection is established.
Returns a connected BluetoothSocket
on successful connection.
Once this call returns, it can be called again to accept subsequent incoming connections.
#close
can be used to abort this call from another thread.
Java documentation for android.bluetooth.BluetoothServerSocket.accept()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Accept(Int32)
Block until a connection is established, with timeout.
[Android.Runtime.Register("accept", "(I)Landroid/bluetooth/BluetoothSocket;", "")]
public Android.Bluetooth.BluetoothSocket? Accept (int timeout);
[<Android.Runtime.Register("accept", "(I)Landroid/bluetooth/BluetoothSocket;", "")>]
member this.Accept : int -> Android.Bluetooth.BluetoothSocket
Parameters
- timeout
- Int32
Returns
a connected BluetoothSocket
- Attributes
Exceptions
on error, for example this call was aborted, or timeout
Remarks
Block until a connection is established, with timeout.
Returns a connected BluetoothSocket
on successful connection.
Once this call returns, it can be called again to accept subsequent incoming connections.
#close
can be used to abort this call from another thread.
Java documentation for android.bluetooth.BluetoothServerSocket.accept(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.