No need to bounce around changing the writer index, we can just set the value directly. Also pull out the handshake checks into a separate function, to improve inlining.
No need to bounce around changing the writer index, we can just set the value directly. Also pull out the handshake checks into a separate function, to improve inlining.