main_windows_test.go 478 B

12345678910111213141516171819202122
  1. // Copyright 2015 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 socktest_test
  5. import "syscall"
  6. var (
  7. socketFunc func(int, int, int) (syscall.Handle, error)
  8. closeFunc func(syscall.Handle) error
  9. )
  10. func installTestHooks() {
  11. socketFunc = sw.Socket
  12. closeFunc = sw.Closesocket
  13. }
  14. func uninstallTestHooks() {
  15. socketFunc = syscall.Socket
  16. closeFunc = syscall.Closesocket
  17. }