1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 04:25:44 -05:00

more effecient auth reader and writer

This commit is contained in:
Darien Raymond
2017-04-27 13:31:09 +02:00
parent 2e756cdaa8
commit 7f1e9c85c9
5 changed files with 123 additions and 54 deletions

View File

@@ -76,8 +76,8 @@ func (b *Buffer) Bytes() []byte {
// Reset resets the content of the Buffer with a supplier.
func (b *Buffer) Reset(writer Supplier) error {
b.start = 0
nBytes, err := writer(b.v)
b.start = 0
b.end = nBytes
return err
}