1UPSCLI_READLINE(3) Network UPS Tools (NUT) UPSCLI_READLINE(3)
2
3
4
6 upscli_readline - read a single response from a UPS
7
9 #include <upsclient.h>
10
11 int upscli_readline(UPSCONN *ups, char *buf, size_t buflen);
12
14 The upscli_readline() function takes the pointer ups to a UPSCONN state
15 structure, receives a single line from the server, and copies up to
16 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
23 The upscli_readline() function returns 0 on success, or -1 if an error
24 occurs.
25
27 upscli_fd(3), upscli_get(3), upscli_readline(3), upscli_sendline(3),
28 upscli_splitname(3), upscli_ssl(3), upscli_strerror(3), upscli_upserā
29 ror(3)
30
31
32
33 Sun Oct 6 2002 UPSCLI_READLINE(3)