conn: xmpp_conn_set_keepalive() stores parameters in conn

Store keepalive parameters in conn object. This allows call the function
with a disconnected conn. Also, the parameters are not cleared on
reconnect and applied once a socket is created.
This commit is contained in:
Dmitry Podgorny
2016-04-26 19:48:34 +00:00
parent a50d706bcd
commit 2ef432f632
3 changed files with 29 additions and 12 deletions

View File

@@ -155,9 +155,12 @@ struct _xmpp_conn_t {
uint64_t timeout_stamp;
int error;
xmpp_stream_error_t *stream_error;
sock_t sock;
tls_t *tls;
sock_t sock;
int ka_timeout; /* TCP keepalive timeout */
int ka_interval; /* TCP keepalive interval */
tls_t *tls;
int tls_support;
int tls_disabled;
int tls_mandatory;