optimize utf8 check tests into state bit
authorAndy Green <andy.green@linaro.org>
Tue, 29 Dec 2015 04:28:48 +0000 (12:28 +0800)
committerAndy Green <andy.green@linaro.org>
Tue, 29 Dec 2015 04:28:48 +0000 (12:28 +0800)
commit9b81d3c967e7d57f202f821a6e8d8eadd846dbc2
treedb4f7516e7b6fe3444c7246800c733de7bb4c857
parent44a7f65e1a36b972670a7a063c8ceb3893f761d1
optimize utf8 check tests into state bit

Considering we go through it once per incoming char, the tests to see if we
should be checking utf-8 are too expensive... move them to a bit that lives
in the wsi and set them once per frame (except for CLOSE who has to update
after the close code has been skipped).

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/client-parser.c
lib/private-libwebsockets.h