forked from quic-go/quic-go
rename MaxReceivePacketSize to MaxPacketBufferSize
We use the same buffer size for sending and receiving packets.
This commit is contained in:
@@ -56,7 +56,7 @@ func (b *packetBuffer) Len() protocol.ByteCount {
|
||||
}
|
||||
|
||||
func (b *packetBuffer) putBack() {
|
||||
if cap(b.Data) != int(protocol.MaxReceivePacketSize) {
|
||||
if cap(b.Data) != int(protocol.MaxPacketBufferSize) {
|
||||
panic("putPacketBuffer called with packet of wrong size!")
|
||||
}
|
||||
bufferPool.Put(b)
|
||||
@@ -74,7 +74,7 @@ func getPacketBuffer() *packetBuffer {
|
||||
func init() {
|
||||
bufferPool.New = func() interface{} {
|
||||
return &packetBuffer{
|
||||
Data: make([]byte, 0, protocol.MaxReceivePacketSize),
|
||||
Data: make([]byte, 0, protocol.MaxPacketBufferSize),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user