mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-24 03:22:01 -08:00
7fa4b06705
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()
24 lines
752 B
Go
24 lines
752 B
Go
package xmpp
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
type Config struct {
|
|
// TransportConfiguration must not be modified after having been passed to NewClient. Any
|
|
// changes made after connecting are ignored.
|
|
TransportConfiguration
|
|
|
|
Jid string
|
|
parsedJid *Jid // For easier manipulation
|
|
Credential Credential
|
|
StreamLogger *os.File // Used for debugging
|
|
Lang string // TODO: should default to 'en'
|
|
ConnectTimeout int // Client timeout in seconds. Default to 15
|
|
// 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
|
|
CharsetReader func(charset string, input io.Reader) (io.Reader, error) // passed to xml decoder
|
|
}
|