ESP8266 or Arduino Ethernet shield w5100 ??

I read Modbus TCP of solar inverter on Uno with ESP8266 without a Modbus library. The attached code from my project is not ideal, but have a look.

Modbus.ino (3.6 KB)