From 12cbd17da7c05e76c5ec74b54c2de1a3e84dbfee Mon Sep 17 00:00:00 2001 From: lumi Date: Sun, 19 Feb 2017 00:01:51 +0100 Subject: [PATCH] add a small example --- examples/client.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/client.rs diff --git a/examples/client.rs b/examples/client.rs new file mode 100644 index 00000000..ac56adb6 --- /dev/null +++ b/examples/client.rs @@ -0,0 +1,11 @@ +extern crate xmpp; + +use xmpp::jid::Jid; +use xmpp::client::ClientBuilder; + +use std::env; + +fn main() { + let jid: Jid = env::var("JID").unwrap().parse().unwrap(); + let client = ClientBuilder::new(jid).connect().unwrap(); +}