Skip to content

Conversation

@nviennot
Copy link
Contributor

No description provided.

@virtualabs
Copy link
Owner

I tried to use select() when I was developping Btlejack, but always had a bigger latency and sometimes Btlejack missed some packets ... Anyway, I'll give your version a try and see if it saves my CPU :)

@nviennot
Copy link
Contributor Author

Arguably, the latency should be better with the select() version when using multi devices, because the client will know which devices to read from, as opposed to try them all round robin. So if we have three devices, and only the third device has data to read, then we just return from the select() call, and invoke read() on the right device immediately.

Having said that, I have not benchmarked the latency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants