Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO: What is the proper way to upload a LARGE file?
From: Igor R (boost.lists_at_[hidden])
Date: 2011-01-13 16:34:01


> Now I need to upload some large fails, and tried this:
>
>  tcp::iostream net_stream(SERVER_ADDR, "12345");
>  // send file name
>  net_stream <<  IN_FILE << "\n";
>  // send tags data size
>  net_stream <<  count << "\n";
>  // copy tags data
>  net_stream.write((char *)data, count);  <<== app crashes here

If it crashes, then most likely the "data" buffer is smaller than
count. What is "data", how do you allocate it?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net