Source file src/net/internal/socktest/main_windows_test.go

     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  package socktest_test
     6  
     7  import "syscall"
     8  
     9  var (
    10  	socketFunc func(int, int, int) (syscall.Handle, error)
    11  	closeFunc  func(syscall.Handle) error
    12  )
    13  
    14  func installTestHooks() {
    15  	socketFunc = sw.Socket
    16  	closeFunc = sw.Closesocket
    17  }
    18  
    19  func uninstallTestHooks() {
    20  	socketFunc = syscall.Socket
    21  	closeFunc = syscall.Closesocket
    22  }
    23  

View as plain text