4 ms·
> After the first CR is identified, it can be skipped along with the following LF without any processing. Then the bulk data can be read using a single read ope
by mac-chaffee 6y ago
> After the first CR is identified, it can be skipped along with the following LF without any processing. Then the bulk data can be read using a single read operation that does not inspect the payload in any way.
Sounds like it only does the character-by-character processing for a dozen or so characters (to read the the command, control chars, and the length). And I think the character-by-character processing is also converting the string "123" to an integer, so the trick of using &&/|| might not work.