refactor(netx): extract tlsdialer from dialer
This commit is contained in:
parent
e0311e8fed
commit
704e5bd870
18 changed files with 699 additions and 494 deletions
|
|
@ -2,7 +2,6 @@ package dialer
|
|||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
|
|
@ -69,12 +68,3 @@ func (EOFAddr) Network() string {
|
|||
func (EOFAddr) String() string {
|
||||
return "127.0.0.1:1234"
|
||||
}
|
||||
|
||||
type EOFTLSHandshaker struct{}
|
||||
|
||||
func (EOFTLSHandshaker) Handshake(
|
||||
ctx context.Context, conn net.Conn, config *tls.Config,
|
||||
) (net.Conn, tls.ConnectionState, error) {
|
||||
time.Sleep(10 * time.Microsecond)
|
||||
return nil, tls.ConnectionState{}, io.EOF
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue