crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

setstring.cc (264B)


      1 #include "netbuffer"
      2 
      3 void Netbuffer::setstring(string const &s) {
      4     debugmsg("Netbuffer: setting to string\n");
      5     
      6     destroy();
      7     check_space(s.size() + 1);    
      8     buf_sz = s.size();	
      9     memcpy (buf_data, s.c_str(), buf_sz);
     10     buf_data[buf_sz] = 0;
     11 }