Pipe copies copy data to & from provided io.ReadWriters.
(tunnelConn, originConn io.ReadWriter, log *zerolog.Logger)
| 86 | |
| 87 | // Pipe copies copy data to & from provided io.ReadWriters. |
| 88 | func Pipe(tunnelConn, originConn io.ReadWriter, log *zerolog.Logger) { |
| 89 | _ = PipeBidirectional(NopCloseWriterAdapter(tunnelConn), NopCloseWriterAdapter(originConn), 0, log) |
| 90 | } |
| 91 | |
| 92 | // PipeBidirectional copies data to two unidirectional streams. It is a special case of Pipe where it receives a concept that allows for Read and Write side to be closed independently. |
| 93 | // The main difference is that when piping data from a reader to a writer, if EOF is read, then this implementation propagates the EOF signal to the destination/writer by closing the write side of the |