1
0
Fork 0

Docs for things I'm mostly happy with.

This commit is contained in:
Matt Goodall 2012-07-06 14:33:28 +01:00
parent 678b9c48a1
commit 8dcfd43ca7
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,8 @@ type Stream struct {
dec *xml.Decoder
}
// Create a XML stream connection. See NewClientStream and NewComponentStream
// for something more useful.
func NewStream(addr string) (*Stream, error) {
log.Println("Connecting to", addr)
@ -36,6 +38,7 @@ func NewStream(addr string) (*Stream, error) {
return &Stream{conn, dec}, nil
}
// Upgrade the stream's underlying net conncetion to TLS.
func (stream *Stream) UpgradeTLS(config *tls.Config) error {
log.Println("Upgrading to TLS")