UPSCLI_SENDLINE(3)
π UPSCLI_SENDLINE(3) β NUT Manual, bestie π
okay so this is the NUT Manual page for UPSCLI_SENDLINE(3), and it's literally about sending one single command to a UPS. group-chat mode activated, facts fully intact, no cap. π
π NAME π
upscli_sendline, upscli_sendline_timeout, upscli_sendline_timeout_may_disconnect β send a single command to a UPS. that's the whole vibe. β¨
π SYNOPSIS π
#include <upsclient.h>
#include <time.h> /* or <sys/time.h> on some platforms */
int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen);
int upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen,
const time_t timeout);
int upscli_sendline_timeout_may_disconnect(UPSCONN_t *ups,
const char *buf, size_t buflen, const time_t timeout,
int may_disconnect);
πΈ DESCRIPTION πΈ
The upscli_sendline() and upscli_sendline_timeout() functions take the pointer ups to a UPSCONN_t state structure and transmit a buffer buf of size buflen to the server. π«Ά
The data in buf must be a fully formatted protocol command as no parsing of the buffer occurs within this function. like, it is not doing the formatting for you, bestie β you bring the fully formatted command. π
The difference between the three functions is that upscli_sendline_timeout() lets the caller decide the amount of time (timeout seconds) after which it should give up and return, whereas upscli_sendline() does not offer this freedom, and uses an immediate timeout (0 second). Both of these disconnect upon errors. The upscli_sendline_timeout_may_disconnect() further allows to enable or disable such disconnections. π₯
π RETURN VALUE π
The upscli_sendline() and upscli_sendline_timeout() functions return 0 on success, or -1 if an error occurs. π
π¦ SEE ALSO π¦
upscli_fd(3)upscli_get(3)upscli_readline(3)upscli_sendline(3)upscli_ssl(3)upscli_strerror(3)upscli_upserror(3)
go peek at these too, iykyk. π§
That's the whole page, bestie β from Network UPS Tools 2.8.5, dated 06/21/2026. periodt. π β¨
π¦ where this page comes from
- arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms