commit 54975c056a7afc1c656ba0bf44971ec00137a51a Author: David Fifield david@bamsoftware.com Date: Tue Dec 10 22:55:57 2013 -0800
Rename ConnectOr to DialOr. --- examples/dummy-server/dummy-server.go | 2 +- pt.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/dummy-server/dummy-server.go b/examples/dummy-server/dummy-server.go index 0ca901c..c01876e 100644 --- a/examples/dummy-server/dummy-server.go +++ b/examples/dummy-server/dummy-server.go @@ -52,7 +52,7 @@ func handler(conn net.Conn) error { handlerChan <- -1 }()
- or, err := pt.ConnectOr(&ptInfo, conn.RemoteAddr(), "dummy") + or, err := pt.DialOr(&ptInfo, conn.RemoteAddr(), "dummy") if err != nil { return err } diff --git a/pt.go b/pt.go index 02cc2c6..50a2e1f 100644 --- a/pt.go +++ b/pt.go @@ -52,7 +52,7 @@ // ... // func handler(conn net.Conn) error { // defer conn.Close() -// or, err := pt.ConnectOr(&ptInfo, conn.RemoteAddr(), "foo") +// or, err := pt.DialOr(&ptInfo, conn.RemoteAddr(), "foo") // if err != nil { // return // } @@ -764,11 +764,11 @@ func extOrPortSetup(s io.ReadWriter, addr net.Addr, methodName string) error { return nil }
-// Connect to info.ExtendedOrAddr if defined, or else info.OrAddr, and return an -// open net.Conn. If connecting to the extended OR port, extended OR port +// Dial info.ExtendedOrAddr if defined, or else info.OrAddr, and return an open +// net.Conn. If connecting to the extended OR port, extended OR port // authentication à la 217-ext-orport-auth.txt is done before returning; an // error is returned if authentication fails. -func ConnectOr(info *ServerInfo, addr net.Addr, methodName string) (net.Conn, error) { +func DialOr(info *ServerInfo, addr net.Addr, methodName string) (net.Conn, error) { if info.ExtendedOrAddr == nil { return net.DialTCP("tcp", nil, info.OrAddr) }
tor-commits@lists.torproject.org