Open nviennot opened 5 years ago
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.
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 :)