2010/5/3 michi7x7 <[email protected]>: > ----- Original Message ---- >>> >>> Does exist any foreseen solution to avoid the classical string break >>> by the '\0' character ? >>> >>> (I use Gio::receive& Gio::send()...) >>> >>> Glus >>> > > If you use a std::string the string should be able to contain '\0'. > > For example: > > Gio::IOStream io_stream; > Glib::RefPtr<Gio::Outputstream> out = io_stream->get_output_stream(); > std::string str("ABC\0DEF"); > out->send(str); > > But I'm not sure about that...
Excuse-me, I'm using Gio::Socket::receive() & Gio::Socket::send(), not Gio::receive() & Gio::send()... Both Gio::Socket::receive() & Gio::Socket::send() take as a chain types "char *" and "const gchar *" values, respectively, but not std::string (right now, I get the values using the c_str() method...) The tests done show me that in most cases all works fine, but sometimes, when "subchain1\0subchain2" only retrive "subchain1".. Glus _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
