Add support for both rustls and tlsnative

This commit is contained in:
Paul Fariello 2021-02-15 19:59:46 +01:00 committed by Astro
commit ae52f6444d
5 changed files with 58 additions and 14 deletions

View file

@ -7,7 +7,10 @@ use std::task::Context;
use tokio::net::TcpStream;
use tokio::task::JoinHandle;
use tokio::task::LocalSet;
use tokio_tls::TlsStream;
#[cfg(feature = "tls-native")]
use tokio_native_tls::TlsStream;
#[cfg(feature = "tls-rust")]
use tokio_rustls::client::TlsStream;
use xmpp_parsers::{ns, Element, Jid, JidParseError};
use super::auth::auth;