1REMCTL_SET_TIMEOUT(3) remctl Library Reference REMCTL_SET_TIMEOUT(3)
2
3
4
6 remctl_set_timeout - Set timeout for subsequent remctl client
7 operations
8
10 #include <remctl.h>
11
12 int remctl_set_timeout(struct remctl *r, time_t timeout);
13
15 remctl_set_timeout() sets the timeout for connections and commands to
16 timeout, which should be an integer number of seconds. timeout may be
17 0 to clear a timeout that was previously set and restore the default
18 behavior of having no timeout. All subsequent operations on the given
19 struct remctl argument will be subject to this timeout, including
20 remctl_open() if called prior to calling remctl_open().
21
22 The timeout is a timeout on network activity from the server, not on a
23 complete operation. So, for example, a timeout of ten seconds just
24 requires that the server send some data every ten seconds. If the
25 server sends only tiny amounts of data at a time, the complete
26 operation could take much longer than ten seconds without triggering
27 the timeout.
28
30 remctl_set_timeout() returns true on success and false on failure. The
31 only failure case is if timeout is negative. On failure, the caller
32 should call remctl_error() to retrieve the error message.
33
35 This interface was added in version 3.1.
36
38 Russ Allbery <eagle@eyrie.org>
39
41 Copyright 2012, 2014 The Board of Trustees of the Leland Stanford
42 Junior University
43
44 Copying and distribution of this file, with or without modification,
45 are permitted in any medium without royalty provided the copyright
46 notice and this notice are preserved. This file is offered as-is,
47 without any warranty.
48
50 remctl_new(3), remctl_command(3), remctl_open(3), remctl_output(3),
51 remctl_error(3)
52
53 The current version of the remctl library and complete details of the
54 remctl protocol are available from its web page at
55 <http://www.eyrie.org/~eagle/software/remctl/>.
56
57
58
593.14 2018-04-01 REMCTL_SET_TIMEOUT(3)