Add disabled-by-default insecure-tcp feature to tokio-xmpp for use by component connections
This commit is contained in:
parent
38bfba4a18
commit
019450ff4b
9 changed files with 112 additions and 12 deletions
10
tokio-xmpp/src/tcp/component.rs
Normal file
10
tokio-xmpp/src/tcp/component.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use crate::{Component, Error};
|
||||
|
||||
use super::TcpServerConnector;
|
||||
|
||||
impl Component<TcpServerConnector> {
|
||||
/// Start a new XMPP component
|
||||
pub async fn new(jid: &str, password: &str, server: String) -> Result<Self, Error> {
|
||||
Self::new_with_connector(jid, password, TcpServerConnector::new(server)).await
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue