From 2a7b8834d750a312eef34ad50d56d49bc9a9341e Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 2 Aug 2023 18:21:57 +0100 Subject: WIP: refactor Element type --- src/client/encrypted.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/client') diff --git a/src/client/encrypted.rs b/src/client/encrypted.rs index 86aba13..03ae295 100644 --- a/src/client/encrypted.rs +++ b/src/client/encrypted.rs @@ -85,6 +85,13 @@ impl<'j> JabberClient<'j> { } } + pub async fn watch(&mut self) -> Result<()> { + loop { + let element = Element::read(&mut self.reader).await?; + println!("{:#?}", element); + } + } + pub async fn sasl(&mut self, mechanisms: &Vec) -> Result<()> { println!("{:?}", mechanisms); let sasl = SASLClient::new(self.jabber.auth.clone()); -- cgit