| 1 | # modbus_set_indication_timeout |
| 2 | |
| 3 | ## Name |
| 4 | |
| 5 | modbus_set_indication_timeout - set timeout between indications |
| 6 | |
| 7 | ## Synopsis |
| 8 | |
| 9 | ```c |
| 10 | void modbus_set_indication_timeout(modbus_t *ctx, uint32_t to_sec, uint32_t to_usec); |
| 11 | ``` |
| 12 | |
| 13 | ## Description |
| 14 | |
| 15 | The *modbus_set_indication_timeout()* function shall set the timeout interval used by |
| 16 | a server to wait for a request from a client. |
| 17 | |
| 18 | The value of `to_usec` argument must be in the range 0 to 999999. |
| 19 | |
| 20 | If both `to_sec` and `to_usec` are zero, this timeout will not be used at all. |
| 21 | In this case, the server will wait forever. |
| 22 | |
| 23 | ## Return value |
| 24 | |
| 25 | The function shall return 0 if successful. Otherwise it shall return -1 and set |
| 26 | errno. |
| 27 | |
| 28 | ## Errors |
| 29 | |
| 30 | - *EINVAL*, the argument `ctx` is NULL or `to_usec` is larger than 1000000. |
| 31 | |
| 32 | ## See also |
| 33 | |
| 34 | - [modbus_get_indication_timeout](modbus_get_indication_timeout.md) |
| 35 | - [modbus_get_response_timeout](modbus_get_response_timeout.md) |
| 36 | - [modbus_set_response_timeout](modbus_set_response_timeout.md) |