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#Copypublic class BluetoothServerSocket : IDisposable
- Inheritance
-
BluetoothServerSocket
Methods
Declaration
C#Copypublic 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
Declaration
C#Copypublic void Dispose()
API Level: 3
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic 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#Copypublic void ListenWithoutAccept()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetooth
Declaration
C#Copypublic 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#Copypublic 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#Copypublic event EventHandler<SocketConnectionRequestedEventArgs> ConnectionRequested
Event Type
Type | Description |
---|---|
EventHandler<SocketConnectionRequestedEventArgs> |