REMCTL_SET_TIMEOUT(3)

πŸ“¦
version 3.18 Β· 3 versions
, in debian bookworm, debian trixie, epel 9, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– REMCTL_SET_TIMEOUT β€” remctl Library Reference πŸŽ€

okay bestie, sit down, we're talking about remctl_set_timeout(3) from the remctl library. this is the girl that tells your connections how long they're allowed to ghost you before we call it a day. she's little, she's powerful, she's lowkey iconic. let's go ✨


🌸 NAME 🌸

remctl_set_timeout β€” set the timeout for subsequent remctl client operations. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <remctl.h>

int remctl_set_timeout(struct remctl *r, time_t timeout);

like, two lines. she's uncomplicated. we love her for that. πŸ’…


✨ DESCRIPTION ✨

so remctl_set_timeout() sets the timeout for connections and commands to timeout, and timeout should be an integer number of seconds, fr fr. no decimals, no vibes-based guessing, just seconds. ⏱️

and here's the cute part: timeout can be 0 to clear a timeout that was previously set and restore the default behavior of having no timeout at all. it's giving "actually never mind, live your life, no clock on you." πŸ•ŠοΈ

every subsequent operation on the given struct remctl argument is gonna be subject to this timeout β€” and yes, that includes remctl_open() if called prior to calling remctl_open(). (the manpage said it, so we're saying it. iykyk. 😭)

okay now the part that matters, bestie: 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 ever triggering the timeout. she's patient like that. πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

remctl_set_timeout() returns true on success and false on failure. and the only failure case is if timeout is negative β€” so don't come in here with negative numbers, that's not the vibe. 🚫

on failure, the caller should call remctl_error() to retrieve the error message. always get the receipts. 🧾


🌈 COMPATIBILITY 🌈

this interface was added in version 3.1. she's been around, she's established, she's a legacy queen. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Russ Allbery <eagle@eyrie.org>

(we stan. 🫢)


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. no cap, no promises, no take-backs. πŸ™ˆ

SPDX-License-Identifier: FSFAP


πŸ“ SEE ALSO πŸ“

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/> β€” go look, it's literally right there. πŸ’–


and that's the whole page, bestie!! ✨ this was version 3.18, dated 2022-05-09, so you know exactly which era of slay you're reading. now go set those timeouts responsibly, mwah πŸ’…πŸ¦‹