---
name: "remctl_set_timeout"
section: "3"
platform: "linux"
package: "libremctl-dev"
version: "3.18-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/remctl_set_timeout"
---

# remctl\_set\_timeout(3)

Set timeout for subsequent remctl client operations

## NAME

remctl\_set\_timeout - Set timeout for subsequent remctl client operations

## SYNOPSIS

\#include \<remctl.h\>

int **remctl\_set\_timeout**(struct remctl \**r*, time\_t *timeout*);

## DESCRIPTION

**remctl\_set\_timeout()** sets the timeout for connections and commands to *timeout*, which should be an integer number of seconds.  *timeout* may be 0 to clear a timeout that was previously set and restore the default behavior of having no timeout.  All subsequent operations on the given struct remctl argument will be subject to this timeout, including **remctl\_open()** if called prior to calling **remctl\_open()**.

The timeout is a timeout on network activity from the server, not on a complete operation.  So, for example, a timeout of ten seconds just requires that the server send some data every ten seconds.  If the server sends only tiny amounts of data at a time, the complete operation could take much longer than ten seconds without triggering the timeout.

## RETURN VALUE

**remctl\_set\_timeout()** returns true on success and false on failure.  The only failure case is if *timeout* is negative.  On failure, the caller should call **remctl\_error()** to retrieve the error message.

## COMPATIBILITY

This interface was added in version 3.1.

## AUTHOR

Russ Allbery \<eagle@eyrie.org\>

## COPYRIGHT AND LICENSE

Copyright 2012, 2014 The Board of Trustees of the Leland Stanford Junior University

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.  This file is offered as-is, without any warranty.

SPDX-License-Identifier: FSFAP

## SEE ALSO

[**remctl\_new**(3)](/remctl_new/3.md), [**remctl\_command**(3)](/remctl_command/3.md), [**remctl\_open**(3)](/remctl_open/3.md), [**remctl\_output**(3)](/remctl_output/3.md), [**remctl\_error**(3)](/remctl_error/3.md)

The current version of the remctl library and complete details of the remctl protocol are available from its web page at \<https://www.eyrie.org/~eagle/software/remctl/\>.
