add comments

This commit is contained in:
iamqizhao
2015-05-01 18:17:36 -07:00
parent 9d59a879e1
commit 814627b32e

View File

@ -104,6 +104,9 @@ func WithDialer(f func(addr string, timeout time.Duration) (net.Conn, error)) Di
}
}
// WithHandshaker returns a DialOption that specifies a function to perform some handshaking
// with the server. It is typically used to negotiate the wire protocol version and security
// protocol with the server.
func WithHandshaker(h func(conn net.Conn) (credentials.TransportAuthenticator, error)) DialOption {
return func(o *dialOptions) {
o.copts.Handshaker = h