mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-04 08:15:21 -05:00
releasable writer
This commit is contained in:
@@ -3,6 +3,7 @@ package io
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/v2ray/v2ray-core/common"
|
||||
"github.com/v2ray/v2ray-core/common/alloc"
|
||||
)
|
||||
|
||||
@@ -12,6 +13,11 @@ type Writer interface {
|
||||
Write(*alloc.Buffer) error
|
||||
}
|
||||
|
||||
type ReleasableWriter interface {
|
||||
Writer
|
||||
common.Releasable
|
||||
}
|
||||
|
||||
// AdaptiveWriter is a Writer that writes alloc.Buffer into underlying writer.
|
||||
type AdaptiveWriter struct {
|
||||
writer io.Writer
|
||||
|
||||
Reference in New Issue
Block a user