saucelabs/forwarder

TrackedConn: optionally implement WriteTo() and ReadFrom() if the underlying connections supports it

mmatczuk opened this issue · 1 comments

The io.Copy has a built in optimization that can issue splice syscall to copy between file descriptors.
On a high level it boils down to checking if WriteTo() and ReadFrom() are implemented, see here.

We could use the same technique we use in delegator to provide type with implementations.
This should be also applied to CloseWrite().

Implemented in #943