blob: 834f122a00dbeb04e4edde617ea3a3896e51bc69 [file] [log] [blame]
khenaidoo26721882021-08-11 17:42:52 -04001// +build go1.8
2
3package websocket
4
5import (
6 "crypto/tls"
7 "net/http/httptrace"
8)
9
10func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
11 if trace.TLSHandshakeStart != nil {
12 trace.TLSHandshakeStart()
13 }
14 err := doHandshake(tlsConn, cfg)
15 if trace.TLSHandshakeDone != nil {
16 trace.TLSHandshakeDone(tlsConn.ConnectionState(), err)
17 }
18 return err
19}