Jonas Schäfer
ce4b739026
xmlstream: allow simplex stream shutdown
...
Unlike poll_close, poll_shutdown will only kill the sending side of the
stream. This is relevant to perform a fully clean shutdown procedure in
XMPP.
2024-09-01 10:02:36 +02:00
Jonas Schäfer
4cfe4f8429
xmlstream: implement simple timeout logic
...
This allows to detect and handle dying streams without getting stuck
forever.
Timeouts are always wrong, though, so we put the burden of choosing the
right values (mostly) on the creator of a stream.
2024-09-01 10:02:36 +02:00
Jonas Schäfer
960fd782bd
xmlstream: fix clean shutdown sequence
...
Without the early return in XmlStream::poll_next in case of the stream
footer, the read state gets recreated and the logic at the top of that
function to actually handle stream shutdown gracefully is never
triggered.
Also that logic was incorrect; the correct behaviour is to wait for the
true EOF.
2024-09-01 10:02:36 +02:00
Jonas Schäfer
efc859abc0
xmlstream: re-introduce syntax-highlit logging of XML stream I/O
2024-09-01 10:02:36 +02:00
Jonas Schäfer
51884eedf7
Fix missing copyright header
2024-08-30 15:40:32 +02:00
Jonas Schäfer
c85c98b0bf
xmlstream: improve responder-side of stream resets
...
This makes the stream resets a lot safer, by preventing the forbidden
send-read-reset combination of events: the reset function on the
responder side now takes the element to send right before the reset,
enforcing a send-reset pattern.
2024-08-29 16:47:13 +02:00
Jonas Schäfer
ab10e30ac0
Port crates to use new XSO-based xmlstream
2024-08-29 16:47:13 +02:00
Jonas Schäfer
7cfda820a6
xmlstream: introduce XMPP specifics
2024-08-29 16:43:20 +02:00
Jonas Schäfer
2c944ebbf8
xmlstream: add access to inner stream
2024-08-29 16:43:06 +02:00
Jonas Schäfer
2931df22db
xmlstream: split initiation reset in two phases
2024-08-29 16:43:00 +02:00
Jonas Schäfer
c723897326
tokio_xmpp: introduce xmlstream module
...
This module provides XSO-based parsing, proper typestates and will
soon replace the proto module.
2024-08-29 16:42:57 +02:00
schnell
274baaef9a
add support for local trust store for rustls
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-22 15:38:39 +02:00
Jonas Schäfer
f77c21f0fc
Update to rxml 0.12.0
2024-08-12 16:16:32 +02:00
cc3400bac7
Reorganize component modules
2024-08-12 10:59:20 +00:00
e6863bd9dd
Reorganized client modules
2024-08-12 10:59:20 +00:00
c63b554e9e
Fix broken link
2024-08-11 20:06:39 +02:00
38baf53de5
Absolute document link
2024-08-11 17:42:58 +00:00
9f4af1625d
Component is now behind insecure-tcp feature flag
2024-08-10 18:09:12 +02:00
16a78d3bb5
More documentation for tokio_xmpp
2024-08-10 16:57:51 +02:00
0b58561003
Rename AsyncClient to Client
2024-08-10 16:57:51 +02:00
311e7406f0
Make Client and Component more unified, and connectors too
2024-08-10 16:57:49 +02:00
fde4c2b640
Move XmppCodec and XmppStream to proto module
2024-08-10 16:49:26 +02:00
ec3c7694a7
Moved starttls connector to tokio_xmpp::connect::starttls module
2024-08-10 16:49:26 +02:00
9151461b10
TCP connector is now in connect module
2024-08-10 16:49:26 +02:00
a3fbd77050
Remove tokio_xmpp::SimpleClient
2024-08-10 16:49:24 +02:00
97698b4d1e
Add dns feature for DNS stuff (not just in starttls)
2024-08-10 16:48:47 +02:00
Emmanuel Gil Peyrot
27e4499153
xmpp-parsers: Simplify SASL mechanisms type
...
These can be a simple String for now.
2024-08-08 13:52:01 +00:00
2fc8e1c1dd
AsyncClient::new reconnects by default, fixes disconnect logic
2024-08-08 15:33:17 +02:00
Emmanuel Gil Peyrot
35932268af
tokio-xmpp: Error out when the stream:features couldn’t be parsed
...
This is nicer than sleeping forever with no debug info whatsoever.
2024-08-06 16:14:42 +02:00
fa99c09585
Indicate which feature flag for each module/type
2024-08-05 11:14:41 +02:00
b3fd0b5372
Move SimpleClient constructors to client::simple_client module
2024-08-04 21:32:38 +02:00
fc0071a0c5
Move AsyncClient::new to client::async_client module
2024-08-04 21:32:36 +02:00
84511b54a0
Only expose one error type in crate root
2024-08-04 18:17:17 +02:00
34796c90d4
Only expose one error type in crate root
2024-08-04 16:04:09 +00:00
5de1891f06
Merged starttls::ConnectorError into starttls::Error
2024-08-04 12:39:56 +00:00
b9fc15977b
Replace tokio_xmpp::stream_features with parsers
2024-08-02 18:25:32 +00:00
ee3d86ec42
Remove tokio_xmpp::ParseError and tokio_xmpp::starttls::ParseError
2024-08-01 12:55:17 +00:00
Maxime “pep” Buquet
5b1706a311
tokio-xmpp: Update dependencies
...
Update tokio_rustls, idna, webpki_roots.
https://github.com/rustls/rustls/releases/tag/v%2F0.22.0
> ConfigBuilder::with_safe_defaults - calls to this can simply be deleted since safe defaults are now implicit.
> OwnedTrustAnchor - use rustls_pki_types::TrustAnchor instead, and replace from_subject_spki_name_constraints with direct assignment to the struct fields.
`RootCertStore::add_trust_anchors` seems to be removed too.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 20:51:20 +02:00
Emmanuel Gil Peyrot
e9b226e1ae
tokio-xmpp: Import Jid, BareJid and Element properly
...
xmpp-parsers has stopped reexporting them, instead it reexports only the
crates themselves.
2024-07-25 14:36:09 +00:00
Parker
eb0bc1b82f
Changed name to XmppCodec
2024-06-15 13:02:15 -04:00
Parker
6d449e9aaa
Make XmppCodec public
2024-06-15 13:02:02 -04:00
Jonas Schäfer
84de007640
Update rxml to 0.11.0
2024-06-15 12:58:39 +02:00
aabd19f78c
State is disconnected, not invalid
2024-06-06 19:44:53 +00:00
Emmanuel Gil Peyrot
002c2803d4
Fix typos across the codebase (thanks codespell!)
2024-05-14 05:46:02 +00:00
Astro
6c3081d656
tokio-xmpp: let happy_eyeballs connect to records in parallel
2024-05-02 22:24:54 +02:00
Astro
598ffdbecf
tokio-xmpp: set resolve ip_strategy to Ipv4AndIpv6
...
The happy_eyeballs implementation should try to connect on both address
families. The default of Ipv4thenIpv6 wouldn't query for AAAA if it got
A.
2024-05-02 22:24:54 +02:00
Jonas Schäfer
0298caf97a
tokio-xmpp: allow docs build with --all-features
...
This affects only the docs and is quite an ugly hack, but seems to be
the only way for now.
2024-04-23 19:22:04 +02:00
Jonas Schäfer
b648b4668b
Fix broken build with tls-native feature
2024-04-23 19:22:04 +02:00
Jonas Schäfer
fb63ac8e50
Update rxml to 0.10.0
...
See release notes [1] for details.
[1]: https://codeberg.org/jssfr/rxml/releases/tag/v0.10.0
2024-03-16 17:39:55 +01:00
Jonas Schäfer
7fce1146e0
Offer {Resource,Node,Domain}Ref on Jid API
...
This provides a non-copying API, which is generally favourable. The
other accessors were removed, because the intent was to provide this
"most sensible" API via the "default" (i.e. shortest, most concisely
named) functions.
2024-03-10 10:51:01 +01:00