1UPSCLI_DISCONNECT(3)        Network UPS Tools (NUT)       UPSCLI_DISCONNECT(3)
2
3
4

NAME

6       upscli_disconnect - disconnect from a UPS server
7

SYNOPSIS

9       #include <upsclient.h>
10
11       int upscli_disconnect(UPSCONN *ups);
12

DESCRIPTION

14       The  upscli_disconnect()  function  takes  the pointer ups to a UPSCONN
15       state structure, shuts down the connection to  the  server,  and  frees
16       dynamic  memory  used by the state structure.  The UPSCONN structure is
17       no longer valid after this function is called.
18
19       This function must be called, or your program will leak memory and file
20       descriptors.
21

RETURN VALUE

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

SEE ALSO

27       upscli_connect(3), upscli_fd(3), upscli_strerror(3), upscli_upserror(3)
28
29
30
31                                Sun Oct  6 2002           UPSCLI_DISCONNECT(3)
Impressum