1UPSCLI_READLINE(3)                NUT Manual                UPSCLI_READLINE(3)
2
3
4

NAME

6       upscli_readline - read a single response from a UPS
7

SYNOPSIS

9       #include <upsclient.h>
10
11       int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen);
12

DESCRIPTION

14       The upscli_readline() function takes the pointer ups to a UPSCONN_t
15       state structure, receives a single line from the server, and copies up
16       to buflen bytes of the response into the buffer buf.
17
18       Some parsing of the string occurs during reception. In particular, ERR
19       messages from upsd(8) are detected and will cause this function to
20       return -1.
21

RETURN VALUE

23       The upscli_readline() function returns 0 on success, or -1 if an error
24       occurs.
25

SEE ALSO

27       upscli_fd(3), upscli_get(3), upscli_readline(3), upscli_sendline(3),
28       upscli_ssl(3), upscli_strerror(3), upscli_upserror(3)
29
30
31
32Network UPS Tools 2.7.3.          03/02/2016                UPSCLI_READLINE(3)
Impressum