1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-20 20:49:12 -04:00

implement transport.pipe

This commit is contained in:
Darien Raymond
2018-04-16 14:57:13 +02:00
parent d6dc88860b
commit 64ebba3cff
7 changed files with 260 additions and 6 deletions

View File

@@ -142,6 +142,14 @@ func (w *BufferedWriter) ReadFrom(reader io.Reader) (int64, error) {
return sc.Size, err
}
// Close implements io.Closable.
func (w *BufferedWriter) Close() error {
if err := w.Flush(); err != nil {
return err
}
return common.Close(w.writer)
}
type seqWriter struct {
writer io.Writer
}