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
|
|
@ -31,7 +31,11 @@ pub struct Component<C: ServerConnector> {
|
|||
|
||||
impl<C: ServerConnector> Component<C> {
|
||||
/// Start a new XMPP component
|
||||
pub async fn new(jid: &str, password: &str, connector: C) -> Result<Self, Error> {
|
||||
pub async fn new_with_connector(
|
||||
jid: &str,
|
||||
password: &str,
|
||||
connector: C,
|
||||
) -> Result<Self, Error> {
|
||||
let jid = Jid::from_str(jid)?;
|
||||
let password = password.to_owned();
|
||||
let stream = component_login(connector, jid.clone(), password).await?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue