add XMPPStream.send_stanza() convenience method
This commit is contained in:
parent
06b97ea228
commit
71e2b1c84f
4 changed files with 14 additions and 8 deletions
|
|
@ -34,8 +34,8 @@ impl<S: AsyncWrite> ComponentAuth<S> {
|
|||
}
|
||||
|
||||
fn send(&mut self, stream: XMPPStream<S>, handshake: Handshake) {
|
||||
let nonza = Element::from(handshake);
|
||||
let send = stream.send(Packet::Stanza(nonza));
|
||||
let nonza = handshake;
|
||||
let send = stream.send_stanza(nonza);
|
||||
|
||||
self.state = ComponentAuthState::WaitSend(send);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue