---
name: "modbus_receive_from"
section: "3"
platform: "linux"
package: "libmodbus-dev"
version: "3.0.6-2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/modbus_receive_from"
---

# modbus\_receive\_from(3)

receive a indication request from a socket

## NAME

modbus\_receive\_from - receive a indication request from a socket

## SYNOPSIS

**int modbus\_receive\_from(modbus\_t \****ctx***, int sockfd, uint8\_t \****req***);**

## DESCRIPTION

The *modbus\_receive\_from()* function shall receive an indication request from the socket/file descriptor given in argument 'sockfd. This function is used by Modbus slave/server to receive and analyze indication request sent by the masters/clients.

## RETURN VALUE

The *modbus\_receive\_from()* function shall store the indication request in *req* and return the request length if sucessful. Otherwise it shall return -1 and set errno.

## SEE ALSO

[**modbus\_receive**(3)](/modbus_receive/3.md)

## AUTHORS

The libmodbus documentation was written by Stéphane Raimbault \<**stephane.raimbault@gmail.com**\[1\]\>

## NOTES

- 1\.

  stephane.raimbault@gmail.com

  mailto:stephane.raimbault@gmail.com
