Client returns a new TLS client side connection using conn as the underlying transport. The config cannot be nil: users must set either ServerName or InsecureSkipVerify in the config.
(conn net.Conn, config *Config)
| 45 | // The config cannot be nil: users must set either ServerName or |
| 46 | // InsecureSkipVerify in the config. |
| 47 | func Client(conn net.Conn, config *Config) *Conn { |
| 48 | c := &Conn{ |
| 49 | conn: conn, |
| 50 | config: config, |
| 51 | isClient: true, |
| 52 | } |
| 53 | c.handshakeFn = c.clientHandshake |
| 54 | return c |
| 55 | } |
| 56 | |
| 57 | // A listener implements a network listener (net.Listener) for TLS connections. |
| 58 | type listener struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…