introduce a buffer pool for large buffers (20k)

This commit is contained in:
Marten Seemann 2023-04-19 09:58:54 +02:00
parent bef0f3d31a
commit 7d8db149b6
5 changed files with 35 additions and 15 deletions

View file

@ -18,7 +18,7 @@ var _ = Describe("Basic Conn Test", func() {
addr := &net.UDPAddr{IP: net.IPv4(1, 2, 3, 4), Port: 1234}
c.EXPECT().ReadFrom(gomock.Any()).DoAndReturn(func(b []byte) (int, net.Addr, error) {
data := []byte("foobar")
Expect(b).To(HaveLen(int(protocol.MaxPacketBufferSize)))
Expect(b).To(HaveLen(protocol.MaxPacketBufferSize))
return copy(b, data), addr, nil
})