github.com/decred/dcrlnd@v0.7.6/buffer/write.go (about) 1 package buffer 2 3 import ( 4 "github.com/decred/dcrlnd/lnwire" 5 ) 6 7 // WriteSize represents the size of the maximum plaintext message than can be 8 // sent using brontide. The buffer does not include extra space for the MAC, as 9 // that is applied by the Noise protocol after encrypting the plaintext. 10 const WriteSize = lnwire.MaxSliceLength 11 12 // Write is static byte array occupying to maximum-allowed plaintext-message 13 // size. 14 type Write [WriteSize]byte 15 16 // Recycle zeroes the Write, making it fresh for another use. 17 func (b *Write) Recycle() { 18 RecycleSlice(b[:]) 19 }