Open efreibe opened 5 years ago
Hi @efreibe I would use the synchronous api in your case
Yes, I'm doing that, I've created a thread and I'm making calls to syncWrite
I simply created the issue because it will be helpful for other people making async requests to get a notification when the write operation is done.
I'm using flutter and the easy way to send a success message back to the channel is waiting for a notification from write async method. But I managed to do it in other way.
You can close it, it's not a blocking issue.
@efreibe Like a JS promise with "then" added at the end to handle the result of the operation? I guess it could be added because it is a nice idea.
Good to hear that. It will give more control to the write process.
Hello,
I'm trying to open the usb port, send data and close it. But I realized that not all the data is transferred to destination.
I suspect that I send a close command while the driver is writing and my data is truncated.
How can I listen to know when all buffer was totally written to the port?
Thank you