|
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