mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-03 00:22:05 +00:00
rewrite alloc.buffer
This commit is contained in:
51 files changed
+391
-299
No files matched your search
@@ -47,7 +47,8 @@ func TestSinglePacket(t *testing.T) {
|
||||
|
||||
traffic := ray.NewRay()
|
||||
data2Send := "Data to be sent to remote"
|
||||
payload := alloc.NewLocalBuffer(2048).Clear().Append([]byte(data2Send))
|
||||
payload := alloc.NewLocalBuffer(2048)
|
||||
payload.Append([]byte(data2Send))
|
||||
|
||||
go freedom.Dispatch(v2net.TCPDestination(v2net.LocalHostIP, tcpServer.Port), payload, traffic)
|
||||
traffic.InboundInput().Close()
|
||||
|
||||
Reference in new issue
Block a user