Class BluetoothServerSocket
Definition
- Assembly:
- Tizen.Network.Bluetooth.dll
The BluetoothSocket provides functions for managing connections to other devices and exchanging data.
public class BluetoothServerSocket : IDisposable
- Inheritance
-
objectBluetoothServerSocket
Methods
View SourceAcceptAsync()
Accepts a connection request asynchronously.
Declaration
public Task<SocketConnection> AcceptAsync()
Returns
Type | Description |
---|---|
Task<><SocketConnection> | A task indicating whether the method is done or not. |
Dispose()
Dispose
Declaration
public void Dispose()
~BluetoothServerSocket()
BluetoothServerSocket destructor.
Declaration
protected ~BluetoothServerSocket()
Listen()
Starts listening on the passed RFCOMM socket and accepts connection requests.
Declaration
public void Listen()
Remarks
The socket must be created with CreateServerSocket(). This API invokes the ConnectionStateChanged event.
ListenWithoutAccept()
Starts listening on the passed RFCOMM socket without accepting connection requests.
Declaration
public void ListenWithoutAccept()
Reject()
Rejects a connection request.
Declaration
public void Reject()
Events
View SourceAcceptStateChanged
The AcceptStateChanged event is raised when the socket connection state is changed.
Declaration
public event EventHandler<AcceptStateChangedEventArgs> AcceptStateChanged
Event Type
Type | Description |
---|---|
EventHandler<><AcceptStateChangedEventArgs> |
ConnectionRequested
Registers a callback function that will be invoked when a RFCOMM connection is requested.
Declaration
public event EventHandler<SocketConnectionRequestedEventArgs> ConnectionRequested
Event Type
Type | Description |
---|---|
EventHandler<><SocketConnectionRequestedEventArgs> |