No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonas Schäfer fc62229dc5 tokio_xmpp: fix Client on servers without Stream Management
The Client::send_stanza method blocks on the stanza actually being sent
over the stream. Without this change, the method will never return
on streams without XEP-0198 Stream Management because `sm_state` is
then None and thus the StanzaToken's state is never advanced: it would
be stuck in Queued state.

In addition, a lack of advancement to Sent state may cause a deadlock on
XEP-0198-enabled streams if data is received so fast that the
frontend_tx mpsc::Sender in the stanzastream::Worker is filled up. In
such a case, the Worker cannot obtain a permit and will only service
writes. However, that will mean that no StanzaTokens can be advanced
beyond Queued state, because for that, reads need to be serviced (to
receive the SM acks).

If a burst of stanzas is then received while Client::send_stanza is
being awaited, send_stanza can only return if something reads from the
frontend mpsc in the meantime. We do not want to require user code to
drive the Client in full-duplex mode, hence this is a bug.

skip-changelog, because this fixes an unreleased feature.
2025-01-25 12:31:32 +00:00
.forgejo/workflows CI: Ensure treeish string works for main 2024-12-30 21:08:42 +01:00
jid jid: serde support for JID parts 2024-12-20 13:06:05 +00:00
minidom minidom: Replace std::io calls with use std::io 2024-12-19 20:51:57 +01:00
parsers xmpp-parsers: Fix vCard-temp test 2025-01-25 13:22:50 +01:00
sasl sasl: Simplify hash conversion to Vec 2024-12-15 17:17:01 +00:00
tokio-xmpp tokio_xmpp: fix Client on servers without Stream Management 2025-01-25 12:31:32 +00:00
xmpp Message and message_correct::Replace now has typed Id 2024-12-30 20:50:43 +00:00
xso xso: remove incorrect/obsolete comment 2025-01-25 12:24:03 +01:00
xso-proc xso-proc: improve error message on type mismatch for extracted fields 2025-01-24 18:28:52 +01:00
.gitea Support Github Actions (for a migration to forgejo) 2023-12-03 14:20:51 +00:00
.github Deny warnings in github/gitea/forgejo CI and act local runner 2024-01-21 13:55:39 +01:00
.gitignore Hello world! 2019-03-21 18:43:27 +01:00
.gitlab-ci.yml CI: Force changelog updates 2024-12-24 11:12:55 +01:00
Cargo.toml xso-proc: start making derive macros for FromXml and IntoXml 2024-06-23 12:20:02 +02:00
CODE_OF_CONDUCT.md Code of Conduct 2024-01-21 21:50:31 +01:00
CONTRIBUTING.md fix typos 2024-09-16 18:29:44 -03:00
LICENSE Readd global LICENSE file 2020-02-25 22:13:34 +01:00
README.md CONTRIBUTING: Split in categories 2024-02-02 22:26:00 +01:00

xmpp-rs

What's this?

A very much WIP set of rust XMPP library with the goals of being type-safe and well-tested.

  • xmpp-rs provides a high-level API for the protocol. You shouldn't need to know about the protocol to use it.
  • tokio-xmpp is a lower-level library that handles the XMPP stream(s).
  • xmpp-parsers parses XML into Rust and back.
  • minidom is a DOM library quite specific for XMPP
  • jid is a Jid parsing library.

Contact

There is an XMPP MUC for the discussion of this library, feel free to join! :)

chat@xmpp.rs

Community

A Code of Conduct is available as CODE_OF_CONDUCT.md in the repository for the well-being of the community. Please refer to it in case of a possible conflict in any of the xmpp-rs venues (channel, forge, etc.).

License

Mozilla Public License 2 (MPL2). See the LICENSE file.

Building

Dependencies should be provided by crates if you use the default features. If you use tokio-xmpp's tls-native feature you will need an ssl library (openssl, libressl, etc.).

cargo build

The various features available should be explained in the crates themselves.

Contributing

Thank you for your interest in the project!

Contributing rules are available as CONTRIBUTING.md in the repository.