GetBuffer returns a buffer from the pool. Caller must return it via PutBuffer after use.
()
| 15 | // GetBuffer returns a buffer from the pool. |
| 16 | // Caller must return it via PutBuffer after use. |
| 17 | func GetBuffer() *[]byte { |
| 18 | return packetPool.Get().(*[]byte) |
| 19 | } |
| 20 | |
| 21 | // PutBuffer returns a buffer to the pool. |
| 22 | // Buffer contents are NOT cleared for performance. |