Class BluetoothServerSocket

Definition

Namespace:
Tizen.Network.Bluetooth
Assembly:
Tizen.Network.Bluetooth.dll
API Level:
3

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

C#
Copy
public class BluetoothServerSocket : IDisposable
Inheritance
BluetoothServerSocket

Methods

View Source

AcceptAsync()

Accepts a connection request asynchronously.

Declaration
C#
Copy
public Task<SocketConnection> AcceptAsync()
Returns
Type Description
Task<SocketConnection>

A task indicating whether the method is done or not.

API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetooth
View Source

Dispose()

Dispose

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

BluetoothServerSocket destructor.

Declaration
C#
Copy
protected void Finalize()
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.

API Level: 3
View Source

ListenWithoutAccept()

Starts listening on the passed RFCOMM socket without accepting connection requests.

Declaration
C#
Copy
public void ListenWithoutAccept()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetooth
View Source

Reject()

Rejects a connection request.

Declaration
C#
Copy
public void Reject()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetooth

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
EventHandler<AcceptStateChangedEventArgs>
API Level: 3
View Source

ConnectionRequested

Registers a callback function that will be invoked when a RFCOMM connection is requested.

Declaration
C#
Copy
public event EventHandler<SocketConnectionRequestedEventArgs> ConnectionRequested
Event Type
Type Description
EventHandler<SocketConnectionRequestedEventArgs>
API Level: 6
Feature: http://tizen.org/feature/network.bluetooth

Extension Methods