mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-15 10:09:15 -04:00
direct multibuf reading from kcp engine
This commit is contained in:
@@ -23,3 +23,13 @@ func TestMultiBufferRead(t *testing.T) {
|
||||
assert.Int(nBytes).Equals(4)
|
||||
assert.Bytes(bs[:nBytes]).Equals([]byte("abcd"))
|
||||
}
|
||||
|
||||
func TestMultiBufferAppend(t *testing.T) {
|
||||
assert := assert.On(t)
|
||||
|
||||
var mb MultiBuffer
|
||||
b := New()
|
||||
b.AppendBytes('a', 'b')
|
||||
mb.Append(b)
|
||||
assert.Int(mb.Len()).Equals(2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user