You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
586 B

  1. // Copyright 2013 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package ipv6_test
  5. import (
  6. "net"
  7. "testing"
  8. )
  9. func connector(t *testing.T, network, addr string, done chan<- bool) {
  10. defer func() { done <- true }()
  11. c, err := net.Dial(network, addr)
  12. if err != nil {
  13. t.Error(err)
  14. return
  15. }
  16. c.Close()
  17. }
  18. func acceptor(t *testing.T, ln net.Listener, done chan<- bool) {
  19. defer func() { done <- true }()
  20. c, err := ln.Accept()
  21. if err != nil {
  22. t.Error(err)
  23. return
  24. }
  25. c.Close()
  26. }