Chih-Wei Chen
171b285cbe
sock : Add DNS-SRV list sorted by priority and weight, check result connection.
2016-08-29 11:32:20 +03:00
Dmitry Podgorny
a2834f8f92
conn: fixed doxygen comments
2016-04-26 20:27:25 +00:00
Dmitry Podgorny
2ef432f632
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.
2016-04-26 19:48:34 +00:00
Dmitry Podgorny
ca7af9c837
Fixed indentation and typos
2016-04-26 19:19:51 +00:00
Dmitry Podgorny
96873984b2
conn: handle stream tag properly
...
If `id == NULL' there were two issues: use-after-free error or
logging wrong error description.
Also open stream handler was called even when error occured and
conn object was disconnected.
2016-04-22 21:04:29 +00:00
Dmitry Podgorny
b06599963b
conn: make xmpp_conn_t object reusable
...
Disconnected xmpp_conn_t object can be connected again. The object
is reset before connection, but the next fields remain untoucned:
* all handlers
* flags
* jid and password
Main use-case of this change is reconnect when an error occurs.
2016-04-22 20:52:36 +00:00
Andrey (Stanson) Kozin
f5c2c81142
Added conn_send_queue_purge() function.
...
Function frees all data and clean send queue in
xmpp_conn_release()
xmpp_connect_client()
xmpp_connect_component()
2016-04-15 16:08:24 +00:00
Dmitry Podgorny
85bf3f4241
conn: don't set flag in xmpp_conn_disable_tls() directly
...
Instead, use xmpp_conn_set_flags() interface to force all necessary
checks.
2016-04-13 12:43:03 +00:00
Dmitry Podgorny
b169c0a91e
conn: refactore connect functions
...
Common code is moved to a separated function.
2016-04-12 20:19:16 +00:00
Dmitry Podgorny
968cb7dcdf
conn: fixed indentation
2016-04-12 20:07:58 +00:00
Dmitry Podgorny
367aeb5844
conn: don't set tcp keepalives for disconnected connection
...
In XMPP_CONN_DISCONNECTED state conn->sock is undefined.
2016-04-08 18:17:07 +00:00
Andrey (Stanson) Kozin
6c1c2a86f8
TCP keepalive setting support
2016-04-08 16:40:56 +00:00
Dmitry Podgorny
b7e308d057
Implemented resolver to replace sock_srv_lookup()
2016-02-20 00:15:08 +02:00
Andrey (Stanson) Kozin
714b2f9c03
Free send queue on connection release
2016-02-06 00:10:21 +00:00
Dmitry Podgorny
01af2deed9
conn: fixed memory leak
...
Memory leak appeared when xmpp_connect_client() was called for a
connection more than once. In this case conn->domain wasn't freed.
2015-10-23 01:28:19 +03:00
Dmitry Podgorny
a39267c1b0
conn: use altport for legacy ssl if specified
2015-10-19 22:42:44 +03:00
Dmitry Podgorny
f63aba88d4
conn: fixed indentations
2015-10-18 02:22:15 +03:00
Dmitry Podgorny
182803926b
conn: added new API xmpp_conn_set_flags()
...
xmpp_conn_set_flags() and xmpp_conn_get_flags() unify interface of
connection configuration.
This interface allows compile-time check of supported features or even
run-time check. Therefore, applications can be built with older
libstrophe which doesn't support some optional flags.
2015-10-15 16:01:13 +03:00
Dmitry Podgorny
07751974ac
conn: fixed typo
2015-10-13 00:53:15 +03:00
Dmitry Podgorny
8ff46add8c
conn: don't remember tls state from old connection
...
* Clear conn->secured and conn->tls_failed. These values could be
saved after re-connect.
* conn is not secured if conn->tls is NULL. This condition handles
disconnected connections.
2015-10-13 00:44:23 +03:00
Dmitry Podgorny
b7fbc81740
conn: added API xmpp_conn_is_secured()
...
This patch is provided by @kjkao. New API is already used in
WorksSystems/wks_xep0047.
2015-10-13 00:10:02 +03:00
Dmitry Podgorny
36af7afa27
conn: implemented old-style SSL connection
...
Added new API xmpp_conn_set_old_style_ssl(). This function forces
using of old-style SSL connection.
2015-10-12 22:25:39 +03:00
Dmitry Podgorny
cda805163f
conn: cleanup of headers
...
* added stdarg.h
* removed unused headers
2015-10-11 05:38:12 +03:00
James Booth
527bc0573a
Fixed _log_open_tag to remove namespace prefix with libexpat
2015-03-28 17:37:11 +00:00
Codewalker
e2f1c1e94a
Add XML namespace support.
2014-12-28 22:46:16 -06:00
Milan Kubík
5d76e052ec
XEP-0114: external component authentication
...
New API xmpp_connect_component() introduced.
2014-12-15 14:41:18 +02:00
Dariusz Dwornikowski
71f75b2e2e
Closes #31
2014-10-23 08:44:52 +02:00
Dmitry Podgorny
1afcd485db
conn: [style] fixed spacing
2014-09-09 20:53:30 +03:00
Alexander Kass
55b6da74d8
len should be signed
2013-09-07 11:58:16 +04:00
James Booth
5875390968
Fixed spacing
2012-05-20 05:16:20 +01:00
James Booth
9615a55856
Added option to disable TLS
...
The connection object includes a tls_support flag, which can
be disabled with xmpp_conn_disable_tls().
2012-05-20 01:50:32 +01:00
Jack Moffitt
801a844e30
Initialize conn->state.
...
Fixes #13 .
2012-02-07 22:54:09 -07:00
Dustin Sallings
d048124969
Capture the bound jid.
...
I'd kind of like to be able to discover the JID with full resource for
some operations.
2009-06-15 14:37:21 -07:00
Jack Moffitt
370a371800
Dual licensed libstrophe under MIT and GPLv3.
...
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Dustin Sallings
690c0c1e85
Log the result of a connect.
2009-04-14 13:11:38 -07:00
Dustin Sallings
e852bfb62e
If an altdomain was specified, use it instead of SRV lookups.
...
For whatever reason, SRV lookups are hanging for me for about 30
seconds making testing suck.
2009-04-14 13:11:38 -07:00
Dustin Sallings
3156f5044f
Free the connection language.
...
This created a memory leak when freeing a connection.
2009-04-14 13:11:38 -07:00
Jack Moffitt
3fd7515dcf
Abstracted XML parser library and switched to autotools building.
...
expat is still the default parser, but libxml2 can also be used
via an option to the configure script. New parsers can easily be
added by implementing a parser_foo.c that uses the interface defined
in parser.h.
2009-04-14 13:47:20 -06:00
Matthew Wild
757d5bad74
+ Add xmpp_conn_get_context() to get the ctx a connection belongs to. Fixes #10
...
* Properly use altdomain when no SRV record. Fixes #2
- Remove unused function declarations from strophe.h. Fixes #1
2008-09-18 03:56:08 +00:00
Jack Moffitt
2b8691f154
Documentation changes for SASL ANONYMOUS.
2008-08-24 16:09:31 +00:00
Jack Moffitt
3b47afaac9
Fix warnings and line endings from previous SRV commit. Get rid of domain parameter of xmpp_connect_client(). Remove usused handler.c helper left over from previous commit.
2008-07-03 05:20:59 +00:00
James Canete
561fac842c
Add linux/unix version of SRV lookup.
...
Add some extra debugging when SRV lookup fails.
2008-07-03 04:32:28 +00:00
Jack Moffitt
65a174ee7e
Most public API points are now documented.
2008-06-24 14:43:54 +00:00
Jack Moffitt
b6027cfd7f
Updated copyright years and fixed LLC typo.
2008-06-19 22:33:13 +00:00
James Canete
6f9be5ef39
Add alternate domain and port to xmpp_client_connect() for when SRV lookups fail.
2008-05-14 20:48:48 +00:00
James Canete
f45380bb23
Added OpenSSL support.
...
Added win32-specific srv lookup support.
Extend session timeout to 15 seconds.
2007-09-05 20:01:24 +00:00
Jack Moffitt
fbb6a6b4c6
Implement stream:error handling.
2006-08-25 19:28:08 +00:00
Jack Moffitt
c52d0aaa28
Add new snprintf/vsnprintf implementation. This should fix the compability
...
problems between Win32 (with its broken implementation) and the standard
stdio API. Also fixed a bug in debug output where long messages got
truncated to 1023 chars, and in xmpp_stanza_to_text where long stanzas
got truncated by one character.
2006-01-21 00:26:40 +00:00
Jack Moffitt
68c9a71774
Partial fix for #11 . Correctly calls connection handler on timeout now,
...
but doesn't yet set the error.
2005-12-01 23:09:20 +00:00
Jack Moffitt
b992133987
Implement session establishment, which is required if the server
...
advertises it. Fixes bugs relating to not-authorized errors on
XMPP compliant servers.
2005-10-18 07:58:38 +00:00