space monkey internal commit export

[katamari commit: b476ea016d372f9735e59c175c4b3f3b0b053ead]
This commit is contained in:
JT Olds 2014-02-28 10:42:54 -07:00
parent fa8eb6a573
commit b94151d9ec

10
conn.go
View File

@ -245,6 +245,16 @@ func (c *Conn) PeerCertificate() (*Certificate, error) {
return cert, nil
}
type ConnectionState struct {
Certificate *Certificate
CertificateError error
}
func (c *Conn) ConnectionState() (rv ConnectionState) {
rv.Certificate, rv.CertificateError = c.PeerCertificate()
return
}
func (c *Conn) shutdown() func() error {
c.mtx.Lock()
defer c.mtx.Unlock()