changeset 242 | 2a9ec03fe5a1 |
241:e77dad242f4c | 242:2a9ec03fe5a1 |
---|---|
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 } |