Ethernet library in the Portenta is based on lwip so not all tunables are available. It is possible however to limit the number of retries directly from the sketch. For example, if the browser is not connected (eg. the soket is closed) write method should return '0'.
I realize old thread, but I have to come back to it (I am in the process of changing an application from the async Ethernet library to the standard Arduino Ethernet, and I am getting connection and responsiveness issues)
Can you explain the above comment in more detail - not sure I get it.
Basically, I am getting a timeout in ArduinoModbus, and then this hangs the webserver until all the retries are completed. Makes things rather unresponsive. I would like to avoid making changes to library files themselves (if I have to look at the write inside the modbus library that would not work as an option - as it would make upkeep of the software very difficult.