It's not about performance benefit. I'd like to make the message/protocol as simple as possible. Just an integer value with 4 significant bits. Leave the presentation and parsing works to JavaScript. C++ code focuses on the bits rather than the strings. It's easy and straightforward to handle strings in JavaScript. So, I'd like to keep this form if you don't strongly against it.