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

@ -216,7 +216,7 @@ var _ = Describe("OOB Conn Test", func() {
Expect(ms).To(HaveLen(batchSize))
for i := 0; i < numMsgRead; i++ {
Expect(ms[i].Buffers).To(HaveLen(1))
Expect(ms[i].Buffers[0]).To(HaveLen(int(protocol.MaxPacketBufferSize)))
Expect(ms[i].Buffers[0]).To(HaveLen(protocol.MaxPacketBufferSize))
data := []byte(fmt.Sprintf("message %d", counter))
counter++
ms[i].Buffers[0] = data