| 16 | ) |
| 17 | |
| 18 | type TCPTCPStream struct { |
| 19 | listener net.Listener |
| 20 | |
| 21 | network string |
| 22 | dstNetwork string |
| 23 | |
| 24 | laddr *net.TCPAddr |
| 25 | dst *net.TCPAddr |
| 26 | agent *agentpool.Agent |
| 27 | |
| 28 | relayProxyProtocolHeader bool |
| 29 | |
| 30 | preDial nettypes.HookFunc |
| 31 | onRead nettypes.HookFunc |
| 32 | |
| 33 | closed atomic.Bool |
| 34 | } |
| 35 | |
| 36 | func NewTCPTCPStream(network, dstNetwork, listenAddr, dstAddr string, agent *agentpool.Agent, relayProxyProtocolHeader bool) (nettypes.Stream, error) { |
| 37 | dst, err := net.ResolveTCPAddr(dstNetwork, dstAddr) |
nothing calls this directly
no outgoing calls
no test coverage detected