add client_bind

This commit is contained in:
Astro 2017-06-19 02:16:47 +02:00
commit 014633d119
4 changed files with 148 additions and 0 deletions

View file

@ -35,6 +35,9 @@ fn main() {
let username = jid.node.as_ref().unwrap().to_owned();
stream.auth(username, password).expect("auth")
}).and_then(|stream| {
stream.bind()
}).and_then(|stream| {
println!("Bound to {}", stream.jid);
stream.for_each(|event| {
match event {
Packet::Stanza(el) => println!("<< {}", el),