Fixed bug that would cause no bytes to be send

Is now using std::string size() instead of strlen.

Strlen sometimes returned less as the actual amount of bytes, because of
serialization?