MCPcopy Create free account
hub / github.com/boostorg/asio / start

Method start

example/cpp11/windows/transmit_file.cpp:78–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
92private:
93 connection(boost::asio::io_context& io_context, const std::string& filename)

Callers 1

handle_acceptMethod · 0.45

Calls 4

transmit_fileFunction · 0.85
bindFunction · 0.50
assignMethod · 0.45
is_openMethod · 0.45

Tested by

no test coverage detected