| 76 | } |
| 77 | |
| 78 | void start() |
| 79 | { |
| 80 | boost::system::error_code ec; |
| 81 | file_.assign(::CreateFile(filename_.c_str(), GENERIC_READ, 0, 0, |
| 82 | OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, 0), ec); |
| 83 | if (file_.is_open()) |
| 84 | { |
| 85 | transmit_file(socket_, file_, |
| 86 | std::bind(&connection::handle_write, shared_from_this(), |
| 87 | boost::asio::placeholders::error, |
| 88 | boost::asio::placeholders::bytes_transferred)); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | private: |
| 93 | connection(boost::asio::io_context& io_context, const std::string& filename) |
no test coverage detected