3 ms·
I thought about that but I didn't want to be stuffing bytes back into the incoming stream and I didn't want to be reading the stream byte-by-byte either unless
by billpg 4y ago
I thought about that but I didn't want to be stuffing bytes back into the incoming stream and I didn't want to be reading the stream byte-by-byte either unless I really had to. I had a nice bit of code that read blocks of bytes and looked for the CRLF separating lines - even handling the case where the CR is one block and the LF is in the next one - and I didn't want to dismantle that.
I read the relevant RFC and there was a clear exception to the rules of PIPELINING that meant a conforming client doesn't send the "ClientHello" until the server has responded to the STLS command. I felt justified in clearing the buffer at that point.