DOKK / manpages / debian 10 / libmodbus-dev / modbus_flush.3.en
MODBUS_FLUSH(3) libmodbus Manual MODBUS_FLUSH(3)

modbus_flush - flush non-transmitted data

int modbus_flush(modbus_t *ctx);

The modbus_flush() function shall discard data received but not read to the socket or file descriptor associated to the context ctx.

The function shall return 0 or the number of flushed bytes if successful. Otherwise it shall return -1 and set errno.

The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>

11/20/2021 libmodbus v3.1.4