예제 #1
0
파일: client.go 프로젝트: postfix/go-tunnel
// DialTLSReconnecting starts a go-tunnel session managed by a ReconnectingSession object
// over a new TLS connection to addr. The ReconnectingSessions will initially Auth to the server with authExtra
// as well as whenever it reconnects.
func DialTLSReconnecting(network, addr string, tlsConfig *tls.Config, authExtra interface{}) (*client.ReconnectingSession, error) {
	dialer := func() (muxado.Session, error) {
		return muxado.DialTLS(network, addr, tlsConfig)
	}

	return client.NewReconnectingSession(dialer, authExtra)
}
예제 #2
0
파일: client.go 프로젝트: postfix/go-tunnel
// DialTLSReconnecting starts a go-tunnel session managed by a ReconnectingSession object
// over a new connection to addr. The ReconnectingSessions will initially Auth to the server with authExtra
// as well as whenever it reconnects.
func DialReconnecting(network, addr string, authExtra interface{}) (*client.ReconnectingSession, error) {
	dialer := func() (muxado.Session, error) {
		return muxado.Dial(network, addr)
	}

	return client.NewReconnectingSession(dialer, authExtra)
}