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 //go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris 6 // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris 7 8 package net 9 10 import "syscall" 11 12 var ( 13 testHookDialChannel = func() {} // for golang.org/issue/5349 14 testHookCanceledDial = func() {} // for golang.org/issue/16523 15 16 // Placeholders for socket system calls. 17 socketFunc func(int, int, int) (int, error) = syscall.Socket 18 connectFunc func(int, syscall.Sockaddr) error = syscall.Connect 19 listenFunc func(int, int) error = syscall.Listen 20 getsockoptIntFunc func(int, int, int) (int, error) = syscall.GetsockoptInt 21 ) 22