You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently UTF8 validation is done on a per frame basis. A frame is read and then checked. True fast UTF8 fail would fail as soon as the first bad byte was read. Doing this would require a different setup for reading from ASIO so it will be low priority for now. THis might need to be done in the future anyways, in particular if a streaming api is ever needed.
The text was updated successfully, but these errors were encountered:
This has been implemented for a bit. websocketpp::DEFAULT_READ_THRESHOLD controls the size of the read/validation batches. Smaller values catch UTF8 errors sooner but involve more ASIO overhead. 1 = fail on first byte, 512 is a pretty good default. Note: a value of <10 is required to pass the AB fast fail test as of version 0.5.0. This may change in the future as values this small are inefficient.
also, endpoint::set_read_threshold(size_t) can be used to set that value at runtime for all future connections, connection::set_read_threshold(size_t) can set it for an individual connection.
Presently UTF8 validation is done on a per frame basis. A frame is read and then checked. True fast UTF8 fail would fail as soon as the first bad byte was read. Doing this would require a different setup for reading from ASIO so it will be low priority for now. THis might need to be done in the future anyways, in particular if a streaming api is ever needed.
The text was updated successfully, but these errors were encountered: