5 modbus_receive - receive an indication request
10 int modbus_receive(modbus_t *'ctx', uint8_t *'req');
15 The *modbus_receive()* function shall receive an indication request from the
16 socket of the context `ctx`. This function is used by a Modbus slave/server to
17 receive and analyze indication request sent by the masters/clients.
19 If you need to use another socket or file descriptor than the one defined in the
20 context `ctx`, see the function [modbus_set_socket](modbus_set_socket.md).
24 The function shall store the indication request in `req` and return the request
25 length if successful. The returned request length can be zero if the indication
26 request is ignored (eg. a query for another slave in RTU mode). Otherwise it
27 shall return -1 and set errno.
31 - [modbus_set_socket](modbus_set_socket.md)
32 - [modbus_reply](modbus_reply.md)