|
Namemodbus_tcp_listen - create and listen a TCP Modbus socket (IPv4) Synopsisint modbus_tcp_listen(modbus_t *ctx, int nb_connection); DescriptionThe modbus_tcp_listen() function shall create a socket and listen to maximum nb_connection incoming connections on the specified IP address. The context ctx must be allocated and initialized with modbus_new_tcp ⟨modbus_new_tcp.md⟩ before to set the IP address to listen, if IP address is set to NULL or '0.0.0.0', any addresses will be listen. Return valueThe function shall return a new socket if successful. Otherwise it shall return -1 and set errno. ExampleFor detailed examples, see source files in tests directory:
See also
|