Add IsSecure() to Transport

This commit is contained in:
Wichert Akkerman
2019-10-11 07:15:47 +02:00
committed by Mickaël Rémond
parent 7fa4b06705
commit 8db608ccc1
4 changed files with 21 additions and 6 deletions
+5
View File
@@ -2,8 +2,11 @@ package xmpp
import (
"crypto/tls"
"errors"
)
var TLSNotSupported = errors.New("Transport does not support StartTLS")
type TransportConfiguration struct {
// Address is the XMPP Host and port to connect to. Host is of
// the form 'serverhost:port' i.e "localhost:8888"
@@ -19,6 +22,8 @@ type Transport interface {
DoesStartTLS() bool
StartTLS(domain string) error
IsSecure() bool
Read(p []byte) (n int, err error)
Write(p []byte) (n int, err error)
Close() error