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)
| 489 | // The config cannot be nil: users must set either ServerName or |
| 490 | // InsecureSkipVerify in the config. |
| 491 | func Client(conn net.Conn, config *Config) *Conn { |
| 492 | c := &Conn{ |
| 493 | conn: conn, |
| 494 | config: config, |
| 495 | isClient: true, |
| 496 | } |
| 497 | c.handshakeFn = c.clientHandshake |
| 498 | return c |
| 499 | } |
| 500 | |
| 501 | // A listener implements a network listener (net.Listener) for TLS connections. |
| 502 | type listener struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…