summaryrefslogtreecommitdiff
path: root/transports/base/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'transports/base/base.go')
-rw-r--r--transports/base/base.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/transports/base/base.go b/transports/base/base.go
index e81ea03..bb0902e 100644
--- a/transports/base/base.go
+++ b/transports/base/base.go
@@ -35,6 +35,8 @@ import (
"git.torproject.org/pluggable-transports/goptlib.git"
)
+type DialFunc func(string, string) (net.Conn, error)
+
// ClientFactory is the interface that defines the factory for creating
// pluggable transport protocol client instances.
type ClientFactory interface {
@@ -48,10 +50,10 @@ type ClientFactory interface {
// generation) to be hidden from third parties.
ParseArgs(args *pt.Args) (interface{}, error)
- // WrapConn wraps the provided net.Conn with a transport protocol
- // implementation, and does whatever is required (eg: handshaking) to get
- // the connection to a point where it is ready to relay data.
- WrapConn(conn net.Conn, args interface{}) (net.Conn, error)
+ // Dial creates an outbound net.Conn, and does whatever is required
+ // (eg: handshaking) to get the connection to the point where it is
+ // ready to relay data.
+ Dial(network, address string, dialFn DialFunc, args interface{}) (net.Conn, error)
}
// ServerFactory is the interface that defines the factory for creating