1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 09:15:37 -05:00

rename alloc to buf

This commit is contained in:
Darien Raymond
2016-12-09 11:35:27 +01:00
parent cd24d6f2d0
commit 7a80409e30
60 changed files with 199 additions and 196 deletions

View File

@@ -5,7 +5,7 @@ import (
"errors"
"io"
"v2ray.com/core/common/alloc"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/serial"
)
@@ -71,7 +71,7 @@ func (v *AEADAuthenticator) Seal(dst, plainText []byte) ([]byte, error) {
type AuthenticationReader struct {
auth Authenticator
buffer *alloc.Buffer
buffer *buf.Buffer
reader io.Reader
chunk []byte
@@ -81,7 +81,7 @@ type AuthenticationReader struct {
func NewAuthenticationReader(auth Authenticator, reader io.Reader, aggressive bool) *AuthenticationReader {
return &AuthenticationReader{
auth: auth,
buffer: alloc.NewLocalBuffer(32 * 1024),
buffer: buf.NewLocalBuffer(32 * 1024),
reader: reader,
aggressive: aggressive,
}