SYNOPSIS

int modbus_tcp_listen(modbus_t *ctx, int nb_connection);

DESCRIPTION

The modbus_tcp_listen() function shall create a socket and listen for nb_connection incoming connections.

RETURN VALUE

The modbus_tcp_listen() function shall return a new socket if successful. Otherwise it shall return -1 and set errno.

EXAMPLE

For a detailed example, see source file bandwith-server-many-up.c provided in tests directory.

SEE ALSO

AUTHORS

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