Expand documentation for getAbbreviatedMessage()

It has always been the intent that getAbbreviatedMessage() is for
producing human-readbale nice output for logging purposes only. But
this has not been mentioned, so (naturally) the function has been
misused. Sigh.
This commit is contained in:
Tor Lillqvist 2016-10-18 15:51:29 +03:00
parent e87cf1e5d8
commit b0c870cbeb

View file

@ -133,7 +133,11 @@ namespace LOOLProtocol
return getFirstLine(message.data(), message.size());
}
/// Returns an abbereviation of the message (the first line, indicating truncation).
/// Returns an abbereviation of the message (the first line, indicating truncation). We assume
/// that it adhers to the LOOL protocol, i.e. that there is always a first (or only) line that
/// is in printable UTF-8. I.e. no encoding of binary bytes is done. The format of the result is
/// not guaranteed to be stable. It is to be used for logging purposes only, not for decoding
/// protocol frames.
inline
std::string getAbbreviatedMessage(const char *message, const int length)
{