openRfcomm method
Opens an RFCOMM channel to device id. If channel is given it is used
verbatim; otherwise the channel is resolved from SDP for serviceUuid.
Implementation
@override
Future<RfcommTransport> openRfcomm(
DeviceId device, {
int? channel,
required Uuid serviceUuid,
Duration? timeout,
}) async {
final delay = connectDelay;
if (delay != null) await Future<void>.delayed(delay);
final err = connectError;
if (err != null) throw err;
final t = FakeRfcommTransport(
device: device,
channel: channel,
serviceUuid: serviceUuid,
maxPayloadSize: transportMaxPayloadSize,
);
transports.add(t);
return t;
}