...
1
2
3
4
5 package ipv6_test
6
7 import (
8 "net"
9 "testing"
10 )
11
12 func connector(t *testing.T, network, addr string, done chan<- bool) {
13 t.Helper()
14 defer func() { done <- true }()
15
16 c, err := net.Dial(network, addr)
17 if err != nil {
18 t.Error(err)
19 return
20 }
21 c.Close()
22 }
23
24 func acceptor(t *testing.T, ln net.Listener, done chan<- bool) {
25 t.Helper()
26 defer func() { done <- true }()
27
28 c, err := ln.Accept()
29 if err != nil {
30 t.Error(err)
31 return
32 }
33 c.Close()
34 }
35
View as plain text