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

@ -11,6 +11,7 @@ use xmpp_codec::*;
use stream_start::*;
use starttls::{NS_XMPP_TLS, StartTlsClient};
use client_auth::ClientAuth;
use client_bind::ClientBind;
pub const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams";
@ -59,6 +60,10 @@ impl<S: AsyncRead + AsyncWrite> XMPPStream<S> {
.with_channel_binding(ChannelBinding::None);
ClientAuth::new(self, creds)
}
pub fn bind(self) -> ClientBind<S> {
ClientBind::new(self)
}
}
/// Proxy to self.stream