DOKK / manpages / debian 11 / libmodbus-dev / modbus_get_socket.3.en
MODBUS_GET_SOCKET(3) libmodbus Manual MODBUS_GET_SOCKET(3)

modbus_get_socket - get the current socket of the context

int modbus_get_socket(modbus_t *ctx);

The modbus_get_socket() function shall return the current socket or file descriptor of the libmodbus context.

The function returns the current socket or file descriptor of the context if successful. Otherwise it shall return -1 and set errno.

modbus_set_socket(3)

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

12/09/2019 libmodbus v3.1.6