mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-06 15:55:48 +08:00
缓存文件实现Sendfile
This commit is contained in:
@@ -13,6 +13,10 @@ func NewBytesCounterWriter(rawWriter io.Writer) *BytesCounterWriter {
|
||||
return &BytesCounterWriter{writer: rawWriter}
|
||||
}
|
||||
|
||||
func (this *BytesCounterWriter) RawWriter() io.Writer {
|
||||
return this.writer
|
||||
}
|
||||
|
||||
func (this *BytesCounterWriter) Write(p []byte) (n int, err error) {
|
||||
n, err = this.writer.Write(p)
|
||||
this.count += int64(n)
|
||||
|
||||
Reference in New Issue
Block a user