Source file
src/net/hook.go
1
2
3
4
5 package net
6
7 import (
8 "context"
9 )
10
11 var (
12
13 testHookDialTCP func(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn, error)
14
15 testHookLookupIP = func(
16 ctx context.Context,
17 fn func(context.Context, string, string) ([]IPAddr, error),
18 network string,
19 host string,
20 ) ([]IPAddr, error) {
21 return fn(ctx, network, host)
22 }
23 testPreHookSetKeepAlive = func(*netFD) {}
24 testHookSetKeepAlive = func(KeepAliveConfig) {}
25
26
27
28
29
30 testHookStepTime = func() {}
31 )
32
View as plain text