Class BluetoothServerSocket

Definition

Namespace:
Tizen.Network.Bluetooth
Assembly:
Tizen.Network.Bluetooth.dll

The BluetoothSocket provides functions for managing connections to other devices and exchanging data.

C#
Copy
public class BluetoothServerSocket : IDisposable
Inheritance
object
BluetoothServerSocket
Implements
System.IDisposable

Methods

View Source

Dispose()

Dispose

Declaration
C#
Copy
public void Dispose()
View Source

~BluetoothServerSocket()

BluetoothServerSocket destructor.

Declaration
C#
Copy
protected ~BluetoothServerSocket()
View Source

Listen()

Starts listening on the passed RFCOMM socket and accepts connection requests.

Declaration
C#
Copy
public void Listen()
Remarks

The socket must be created with CreateServerSocket(). This API invokes the ConnectionStateChanged event.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the Bluetooth is not enabled or when the listen on socket procedure fails.

Events

View Source

AcceptStateChanged

The AcceptStateChanged event is raised when the socket connection state is changed.

Declaration
C#
Copy
public event EventHandler<AcceptStateChangedEventArgs> AcceptStateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><AcceptStateChangedEventArgs>
Exceptions
Type Condition
System.InvalidOperationException

Thrown when the Bluetooth is not enabled or when the register accpet state changed callback fails.

Implements

System.IDisposable