| Abhay Kumar | a61c522 | 2025-11-10 07:32:50 +0000 | [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 | } | ||||