summaryrefslogtreecommitdiff
path: root/src/rexmpp_tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rexmpp_tcp.h')
-rw-r--r--src/rexmpp_tcp.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/rexmpp_tcp.h b/src/rexmpp_tcp.h
index 5a296cc..8ee32a0 100644
--- a/src/rexmpp_tcp.h
+++ b/src/rexmpp_tcp.h
@@ -20,6 +20,7 @@
#define REXMPP_TCP_H
#include <sys/time.h>
+#include <stdbool.h>
#include "rexmpp.h"
#include "rexmpp_dns.h"
@@ -98,13 +99,13 @@ struct rexmpp_tcp_connection {
/** @brief The number of connection attempts so far. */
int connection_attempts;
- /** @brief Next scheduled connection time. */
- struct timeval next_connection_time;
+ /** @brief Next scheduled connection time (monotonic). */
+ struct timespec next_connection_time;
/** @brief File descriptor of a connected socket. */
int fd;
/** @brief Whether the A or AAAA records used to establish the final
connection were verified with DNSSEC. */
- int dns_secure;
+ bool dns_secure;
};
/**
@@ -175,13 +176,13 @@ int rexmpp_tcp_conn_fds (rexmpp_t *s,
@param[in] s ::rexmpp
@param[in] conn An active connection structure.
@param[in] max_tv An existing maximum timeout.
- @param[out] tv A timeval structure to store a new timeout in.
+ @param[out] tv A timespec structure to store a new timeout in.
@returns A pointer to either max_tv or tv, depending on which one
is smaller.
*/
-struct timeval *rexmpp_tcp_conn_timeout (rexmpp_t *s,
- rexmpp_tcp_conn_t *conn,
- struct timeval *max_tv,
- struct timeval *tv);
+struct timespec *rexmpp_tcp_conn_timeout (rexmpp_t *s,
+ rexmpp_tcp_conn_t *conn,
+ struct timespec *max_tv,
+ struct timespec *tv);
#endif