// DialTCPFn dials the given tcp addr, using the given timeoutReadWrite and
// privKey for the authenticated encryption handshake.
DialTCPFn dials the given tcp addr, using the given timeoutReadWrite and
privKey for the authenticated encryption handshake.
// DialTCPFn dials the given tcp addr using the given timeoutReadWrite and // privKey for the authenticated encryption handshake .
func DialTCPFn(addr string, timeoutReadWrite time.Duration, privKey ed25519.PrivKeyEd25519) SocketDialer {
	return func() (net.Conn, error) {
		conn, err := cmn.Connect(addr)
		if err == nil {
			deadline := time.Now().Add(timeoutReadWrite)
			err = conn.SetDeadline(deadline)
		}
		if err == nil {
			conn, err = p2pconn.MakeSecretConnection(conn, privKey)
		}
		return conn, err
	}
}
func DialTCPFn ( addr string , timeoutReadWrite time . Duration , privKey ed25519 . PrivKeyEd25519 ) SocketDialer { return func ( ) ( net . Conn , error ) { conn , err := cmn . Connect ( addr ) if err == nil { deadline := time . Now ( ) . Add ( timeoutReadWrite ) err = conn . SetDeadline ( deadline ) } if err == nil { conn , err = p2pconn . MakeSecretConnection ( conn , privKey ) } return conn , err } }
DialTCPFn dials the given tcp addr, using the given timeoutReadWrite and
privKey for the authenticated encryption handshake.
DialTCPFn dials the given tcp addr using the given timeoutReadWrite and privKey for the authenticated encryption handshake .