• Brad Fitzpatrick's avatar
    http2: change the pipe and buffer code · b7f5d985
    Brad Fitzpatrick authored
    Make the pipe code take an interface as the backing store.  Now a pipe
    is something that's goroutine-safe and does the Cond waits but its underlying data
    is now an interface: anything that's a ReaderWriter with a Len method (such as a
    *bytes.Buffer), or a fixedBuffer (renamed in this CL from 'buffer').
    
    This opens the ground to having a non-fixed buffer used with pipe.
    
    This also moves the CloseWithError code up into the pipe code, out of
    fixedBuffer.
    
    Change-Id: Ia3b853e8aa8920807b705ff4e41bed934a8c67b7
    Reviewed-on: https://go-review.googlesource.com/16312Reviewed-by: 's avatarBlake Mizerany <blake.mizerany@gmail.com>
    b7f5d985
pipe_test.go 469 Bytes