mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-21 09:03:44 -08:00
Refactor tests
This commit is contained in:
11
config.go
11
config.go
@@ -21,4 +21,15 @@ type Config struct {
|
||||
// Insecure can be set to true to allow to open a session without TLS. If TLS
|
||||
// is supported on the server, we will still try to use it.
|
||||
Insecure bool
|
||||
|
||||
// Activate stream management process during session
|
||||
StreamManagementEnable bool
|
||||
// Enable stream management resume capability
|
||||
streamManagementResume bool
|
||||
}
|
||||
|
||||
// IsStreamResumable tells if a stream session is resumable by reading the "config" part of a client.
|
||||
// It checks if stream management is enabled, and if stream resumption was set and accepted by the server.
|
||||
func IsStreamResumable(c *Client) bool {
|
||||
return c.config.StreamManagementEnable && c.config.streamManagementResume
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user