int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client);
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout);
long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
.fi
.SH"DESCRIPTION"
.sp
These functions allow to manage connections to \fBupsd\fR(8) using NUT TCP protocol\&.
.sp
The \fBnutclient_tcp_create_client()\fR function create the \fINUTCLIENT_TCP_t\fR context and intend to connect to upsd at \fIhost\fR and \fIport\fR\&. The context must be freed by \fInutclient_destroy()\fR
.sp
\fIhost\fR can be a sever name or a valid IPv4 or IPv6 adress like "localhost", "127\&.0\&.0\&.1" or "::1"\&.
.sp
\fIport\fR is a valid TCP port, genrally 3493\&.
.sp
The \fBnutclient_tcp_is_connected()\fR function test if the connection is valid\&.
.sp
The \fBnutclient_tcp_disconnect()\fR function force to disconnect the specified connection\&.
.sp
The \fBnutclient_tcp_reconnect()\fR function force to reconnect a connection, disconnecting it if needed\&.
.sp
The \fBnutclient_tcp_set_timeout()\fR function set the timeout duration for I/O operations\&.
.sp
The \fBnutclient_tcp_get_timeout()\fR function retrieve the timeout duration for I/O operations\&.
.sp
\fItimeout\fR values are specified in seconds, negatives values for blocking\&.