1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-23 12:02:58 -05:00

refine buffer usage in kcp

This commit is contained in:
v2ray
2016-07-28 16:24:15 +02:00
parent 34b4fceaa4
commit 42efa5dde0
10 changed files with 148 additions and 19 deletions

View File

@@ -17,12 +17,12 @@ const (
// quickly.
type Buffer struct {
head []byte
pool *BufferPool
pool Pool
Value []byte
offset int
}
func CreateBuffer(container []byte, parent *BufferPool) *Buffer {
func CreateBuffer(container []byte, parent Pool) *Buffer {
b := new(Buffer)
b.head = container
b.pool = parent