> You have two choices:
> 1. Send the '\0' as part of the message (and set length to one more byte).
> 2. Append a '\0' after receiving the message.

Uh, why?
string(static_cast<char*>(reply.data()),reply.size());
doesn't assume the string is null terminated. It constructs string from pointer 
and length. Isn't adding a in a null just going mask the real issue and make it 
look like the std::string only contained "login" when really it still contained 
the extra stuff as well.
David, Do you know what reply.size() actually contains? Have you tried printing 
that out and comparing it to what you expect?

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to