Rename AsyncClient to Client

This commit is contained in:
xmppftw xmppftw 2024-08-06 21:00:11 +02:00
commit 0b58561003
10 changed files with 16 additions and 12 deletions

View file

@ -40,11 +40,11 @@ use crate::{
connect::{DnsConfig, ServerConnector, ServerConnectorError},
error::{Error, ProtocolError},
proto::{Packet, XmppStream},
AsyncClient, Component,
Client, Component,
};
/// Client that connects over StartTls
pub type StartTlsClient = AsyncClient<StartTlsServerConnector>;
pub type StartTlsClient = Client<StartTlsServerConnector>;
/// Component that connects over StartTls
pub type StartTlsComponent = Component<StartTlsServerConnector>;

View file

@ -2,14 +2,17 @@
use tokio::net::TcpStream;
use crate::connect::DnsConfig;
use crate::{connect::ServerConnector, proto::XmppStream, AsyncClient, Component, Error};
use crate::{
connect::{DnsConfig, ServerConnector},
proto::XmppStream,
Client, Component, Error,
};
/// Component that connects over TCP
pub type TcpComponent = Component<TcpServerConnector>;
/// Client that connects over TCP
pub type TcpClient = AsyncClient<TcpServerConnector>;
pub type TcpClient = Client<TcpServerConnector>;
/// Connect via insecure plaintext TCP to an XMPP server
/// This should only be used over localhost or otherwise when you know what you are doing

View file

@ -26,7 +26,7 @@ mod client;
pub mod connect;
pub mod proto;
pub use client::async_client::Client as AsyncClient;
pub use client::async_client::Client;
mod component;
pub use crate::component::Component;
/// Detailed error types