2017-07-18 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / libgo / go / net / hook_windows.go
blob63ea35ab8c444a60bc1710ad01ddb2c5ce77686b
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.
5 package net
7 import (
8 "syscall"
9 "time"
12 var (
13 testHookDialChannel = func() { time.Sleep(time.Millisecond) } // see golang.org/issue/5349
15 // Placeholders for socket system calls.
16 socketFunc func(int, int, int) (syscall.Handle, error) = syscall.Socket
17 closeFunc func(syscall.Handle) error = syscall.Closesocket
18 connectFunc func(syscall.Handle, syscall.Sockaddr) error = syscall.Connect
19 connectExFunc func(syscall.Handle, syscall.Sockaddr, *byte, uint32, *uint32, *syscall.Overlapped) error = syscall.ConnectEx
20 listenFunc func(syscall.Handle, int) error = syscall.Listen
21 acceptFunc func(syscall.Handle, syscall.Handle, *byte, uint32, uint32, uint32, *uint32, *syscall.Overlapped) error = syscall.AcceptEx