Open nancyyihao opened 1 year ago
I want to set a timeout if modbus slave not response in a given time(like 2000ms), how can I do it ?
With a simple solution you could do this
var coils = await _client.readCoils(1,1).timeout(Duration(miliseconds: 2000), onTimeout: () { //Do something });
I want to set a timeout if modbus slave not response in a given time(like 2000ms), how can I do it ?