Menu

The binary wrapper

Help
2005-03-29
2013-04-11
  • Staffan Vilcans

    Staffan Vilcans - 2005-03-29

    I noticed that the binry type is coded as a string type. Doesn't that cause problems if the binary data I want to transfer is, for instance, a0 00 1b 2a. Doesn't the string functions like length() stop at the first zero character?

     
    • Radu-Adrian Popescu

      String/binary data is encoded as {length,payload} in Hessian. The std::string class is created using the (size_t, char*) constructor so that the string object has it's length set, not computer. Therefore all operations on the string object are binary-safe, including lenght(), iterators and whatnot.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.