Modbus TCP/IP

You'll find a bunch of them if you search for "arduino modbus tcp library" on Google. I looked at two or three of them while helping on the forum but doesn't use one myself as I only use ModBus RTU in my projects. None of the ModBus TCP library I've seen is well organized and structured so I won't recommend one. I remember that one of them was written so bad that it won't work even with several patches we made but I don't remember which one it was.
Also many of them are only for a ModBus slave (called server in the ModBus TCP terminology).