2019-10-06 17:37:56 +00:00
|
|
|
package xmpp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/tls"
|
|
|
|
)
|
|
|
|
|
2019-10-11 04:24:27 +00:00
|
|
|
type TransportConfiguration struct {
|
|
|
|
ConnectTimeout int // Client timeout in seconds. Default to 15
|
|
|
|
// tls.Config must not be modified after having been passed to NewClient. Any
|
|
|
|
// changes made after connecting are ignored.
|
|
|
|
TLSConfig *tls.Config
|
|
|
|
}
|
|
|
|
|
2019-10-06 17:37:56 +00:00
|
|
|
type Transport interface {
|
2019-10-11 04:24:27 +00:00
|
|
|
Connect(address string) error
|
2019-10-06 17:37:56 +00:00
|
|
|
DoesStartTLS() bool
|
2019-10-11 04:24:27 +00:00
|
|
|
StartTLS(domain string) error
|
2019-10-06 17:37:56 +00:00
|
|
|
|
|
|
|
Read(p []byte) (n int, err error)
|
|
|
|
Write(p []byte) (n int, err error)
|
|
|
|
Close() error
|
|
|
|
}
|