khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 1 | // +build go1.8 |
2 | |||||
3 | package websocket | ||||
4 | |||||
5 | import ( | ||||
6 | "crypto/tls" | ||||
7 | "net/http/httptrace" | ||||
8 | ) | ||||
9 | |||||
10 | func 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 | } |