pub type TcpClient = Client;
👎Deprecated since 5.0.0: use tokio_xmpp::Client instead
Available on crate feature
insecure-tcp
only.Expand description
Client that connects over TCP
Aliased Type§
struct TcpClient { /* private fields */ }
Implementations
Source§impl Client
impl Client
Sourcepub fn new_with_connector<J: Into<Jid>, P: Into<String>, C: ServerConnector>(
jid: J,
password: P,
connector: C,
timeouts: Timeouts,
) -> Self
pub fn new_with_connector<J: Into<Jid>, P: Into<String>, C: ServerConnector>( jid: J, password: P, connector: C, timeouts: Timeouts, ) -> Self
Start a new client given that the JID is already parsed.
Source§impl Client
impl Client
Sourcepub fn bound_jid(&self) -> Option<&Jid>
pub fn bound_jid(&self) -> Option<&Jid>
Get the client’s bound JID (the one reported by the XMPP server).
Sourcepub async fn send_stanza(
&mut self,
stanza: Stanza,
) -> Result<StanzaToken, Error>
pub async fn send_stanza( &mut self, stanza: Stanza, ) -> Result<StanzaToken, Error>
Send stanza
Sourcepub fn get_stream_features(&self) -> Option<&StreamFeatures>
pub fn get_stream_features(&self) -> Option<&StreamFeatures>
Get the stream features (<stream:features/>
) of the underlying stream
Trait Implementations
Source§impl Stream for Client
Incoming XMPP events
impl Stream for Client
Incoming XMPP events
In an async fn
you may want to use this with use futures::stream::StreamExt;