stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.3k stars 1.71k forks source link

feat(modbus): use poll() for Linux instead of select() #617

Open fcntlcc opened 2 years ago

fcntlcc commented 2 years ago

The 1024 limitation of select() makes some problem these days. I think using poll() for *nix systems may be a better choice.

cla-bot[bot] commented 2 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get yourself added.

stephane commented 1 year ago

After a quick look, it seems the tv struct could be replaced by a single integer var (ms). Are you sure it's supported on other Unix systems (FreeBSD, MacOS, etc)?