'\" t .\" Title: modbus_get_socket .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/28/2020 .\" Manual: libmodbus Manual .\" Source: libmodbus v3.1.6 .\" Language: English .\" .TH "MODBUS_GET_SOCKET" "3" "02/28/2020" "libmodbus v3\&.1\&.6" "libmodbus Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" modbus_get_socket \- get the current socket of the context .SH "SYNOPSIS" .sp \fBint modbus_get_socket(modbus_t *\fR\fB\fIctx\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fBmodbus_get_socket()\fR function shall return the current socket or file descriptor of the libmodbus context\&. .SH "RETURN VALUE" .sp The function returns the current socket or file descriptor of the context if successful\&. Otherwise it shall return \-1 and set errno\&. .SH "SEE ALSO" .sp \fBmodbus_set_socket\fR(3) .SH "AUTHORS" .sp The libmodbus documentation was written by Stéphane Raimbault