I am not sure how many times this is called?
I think every new connection?
Also have the feeling that resizeing the buffer is always needed on IPv6 connection.
So just alloc the full buffer to prevent just an extra alloction call.
|
let mut buf = vec![0; 16]; |
Maybe update this part with.
let mut buf = Vec::with_capacity(HDR_SIZE_LIMIT);
buf.resize(10, 0);