thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

Add correct bytesWritten in transferOut statuses #4

Open thegecko opened 6 years ago

thegecko commented 6 years ago

The controlTransferOut() and transferOut() methods should return the count of actual bytes written. Instead, bytesWritten is being set to the same length as the buffer being written as node-usb doesn't return the information.

To fix this, the actual value needs to be exposed in node-usb.