(ch <-chan Chunk, localAddr, remoteAddr net.Addr, log logger)
| 102 | } |
| 103 | |
| 104 | func newWithLogger(ch <-chan Chunk, localAddr, remoteAddr net.Addr, log logger) *FakeConn { |
| 105 | if localAddr == nil { |
| 106 | localAddr = placeholderAddr{label: "fakeconn-local"} |
| 107 | } |
| 108 | if remoteAddr == nil { |
| 109 | remoteAddr = placeholderAddr{label: "fakeconn-remote"} |
| 110 | } |
| 111 | return &FakeConn{ |
| 112 | ch: ch, |
| 113 | logger: log, |
| 114 | closeCh: make(chan struct{}), |
| 115 | local: localAddr, |
| 116 | remote: remoteAddr, |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // Read implements io.Reader / net.Conn. It first drains any bytes |
| 121 | // left over from a previous Chunk, then blocks for the next Chunk |
no outgoing calls
no test coverage detected