File: modbus_get_socket.md

package info (click to toggle)
libmodbus 3.1.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,112 kB
  • sloc: ansic: 5,495; javascript: 137; makefile: 90; sh: 26
file content (25 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# modbus_get_socket

## Name

modbus_get_socket - get the current socket of the context

## Synopsis

```c
int modbus_get_socket(modbus_t *'ctx');
```

## Description

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

## Return value

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

## See also

- [modbus_set_socket](modbus_set_socket.md)