Add initial support for stream management

For now it support enabling SM, replying to ack requests from server,
and trying resuming the session with existing Stream Management state.
This commit is contained in:
Mickael Remond
2019-07-31 18:47:30 +02:00
committed by Mickaël Rémond
parent e531370dc9
commit 3de99e0e0e
6 changed files with 261 additions and 15 deletions

View File

@@ -108,6 +108,10 @@ func (c *Component) Connect() error {
}
}
func (c *Component) Resume() error {
return errors.New("components do not support stream management")
}
func (c *Component) Disconnect() {
_ = c.SendRaw("</stream:stream>")
// TODO: Add a way to wait for stream close acknowledgement from the server for clean disconnect