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 5 // +build !plan9,!windows 6 7 package socktest_test 8 9 import "syscall" 10 11 var ( 12 socketFunc func(int, int, int) (int, error) 13 closeFunc func(int) error 14 ) 15 16 func installTestHooks() { 17 socketFunc = sw.Socket 18 closeFunc = sw.Close 19 } 20 21 func uninstallTestHooks() { 22 socketFunc = syscall.Socket 23 closeFunc = syscall.Close 24 } 25