spdystream
spdystream copied to clipboard
Make spdystream.Stream implement io.WriteTo or io.ReaderFrom interface
io.Copy currently copies in chunks of 3KB for standard io.Writer and io.Reader implementations, but will instead use io.WriteTo or io.ReadFrom if the writer or reader supports the relevant method. To improve the performance of copying to/from spdystream.Stream, we can tweak the chunk size by implementing these methods.
We currently use io.Copy for spdystream.Stream in docker/libchan to handle transparent stream passing, so this could potentially improve the performance of libchan over spdy.
See io.Copy source for reference.