write method
Implementation
Future<bool> write(Uint8List payload, bool flush) async {
if (remoteId == null) {
throw Exception('Remote ID is not set');
}
while (!isClosed && !_writeReady) {
await Future.delayed(const Duration(milliseconds: 100));
}
if (isClosed) {
return false;
}
_writeReady = false;
_writeReadyController.add(_writeReady);
await _adbConnection.sendMessage(AdbProtocol.generateWrite(localId, remoteId!, payload), flush: flush);
return true;
}