Required Instance Methodpureswift.bluetooth 7.2.0Bluetooth
setSecurityLevel(_:)
Attempts to change the socket’s security level.
func setSecurityLevel(_ securityLevel: SecurityLevel) throws(Self.Error)
Attempts to change the socket’s security level.
func setSecurityLevel(_ securityLevel: SecurityLevel) throws(Self.Error)
s9Bluetooth15L2CAPConnectionP16setSecurityLevelyyAA0eF0O5ErrorQzYKF
What are these?4M3JO
import Bluetooth
Pure Swift Bluetooth Definitions.
protocol L2CAPConnection : L2CAPSocket
enum SecurityLevel
Bluetooth security level.
associatedtype Error : Error
associatedtype Data : DataContainer
static func lowEnergyClient(address: BluetoothAddress, destination: BluetoothAddress, isRandom: Bool) throws(Self.Error) -> Self
Creates a new socket connected to the remote address specified.
var destination: BluetoothAddress { get }
func receive(_ bufferSize: Int) throws(Self.Error) -> Self.Data
Reads from the socket.
func securityLevel() throws(Self.Error) -> SecurityLevel
Get security level
func send(_ data: Data) throws(Self.Error)
Write to the socket.