github.com/rakyll/go@v0.0.0-20170216000551-64c02460d703/src/internal/poll/hook_windows.go (about)

     1  // Copyright 2017 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 poll
     6  
     7  import (
     8  	"syscall"
     9  )
    10  
    11  // CloseFunc is used to hook the close call.
    12  var CloseFunc func(syscall.Handle) error = syscall.Closesocket
    13  
    14  // AcceptFunc is used to hook the accept call.
    15  var AcceptFunc func(syscall.Handle, syscall.Handle, *byte, uint32, uint32, uint32, *uint32, *syscall.Overlapped) error = syscall.AcceptEx
    16  
    17  // ConnectExFunc is used to hook the ConnectEx call.
    18  var ConnectExFunc func(syscall.Handle, syscall.Sockaddr, *byte, uint32, *uint32, *syscall.Overlapped) error = syscall.ConnectEx