|
@@ -349,6 +349,20 @@ void con_handler::handle_read_command(const boost::system::error_code &err,
|
|
|
placeholders::error,
|
|
|
placeholders::bytes_transferred));
|
|
|
} else {
|
|
|
+ answer["accept"] = true;
|
|
|
+
|
|
|
+ const std::string answerString =
|
|
|
+ Json::writeString(stringBuilder, answer);
|
|
|
+
|
|
|
+ sock.async_write_some(buffer(answerString, max_length),
|
|
|
+ boost::bind(&con_handler::handle_write,
|
|
|
+ shared_from_this(),
|
|
|
+ placeholders::error,
|
|
|
+ placeholders::bytes_transferred));
|
|
|
+
|
|
|
+ answer = Json::Value();
|
|
|
+ answer["command"] = "get";
|
|
|
+
|
|
|
// get size of file
|
|
|
size_t size = this->getFile.tellg();
|
|
|
this->getFile.seekg(std::ios::beg);
|