http urls monitor.

trace.go 396B

1234567891011121314151617181920
  1. // +build go1.8
  2. package websocket
  3. import (
  4. "crypto/tls"
  5. "net/http/httptrace"
  6. )
  7. func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
  8. if trace.TLSHandshakeStart != nil {
  9. trace.TLSHandshakeStart()
  10. }
  11. err := doHandshake(tlsConn, cfg)
  12. if trace.TLSHandshakeDone != nil {
  13. trace.TLSHandshakeDone(tlsConn.ConnectionState(), err)
  14. }
  15. return err
  16. }