Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async methods to get descriptors #59

Open
axelkar opened this issue Jun 11, 2024 · 1 comment
Open

Async methods to get descriptors #59

axelkar opened this issue Jun 11, 2024 · 1 comment
Labels
feature-request New feature or request

Comments

@axelkar
Copy link

axelkar commented Jun 11, 2024

Currently get_descriptor, get_string_descriptor and get_string_descriptor_supported_languages all block. Could async versions of these methods be made?

@kevinmehall
Copy link
Owner

On macOS and Linux, get_descriptor just calls control_in_blocking and could just as easily use the async control_in, or you could replicate it with control_in externally. On Windows, it calls IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION. Windows DeviceIoControl takes an overlapped parameter that potentially allows it to be used with IOCP asynchronously, but I haven't tested this.

@kevinmehall kevinmehall added the feature-request New feature or request label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants