Replaced Server/Client::shared_from_this with asio callback checks if the Server/Client has been destroyed. Also added SharedMutex to utility.hpp.

This commit is contained in:
eidheim 2017-07-05 10:16:31 +02:00
commit 9b5063f422
9 changed files with 500 additions and 163 deletions

View file

@ -13,7 +13,7 @@ public:
void accept() override {}
void parse_request_test() {
auto session = std::make_shared<Session>(this->shared_from_this(), std::make_shared<HTTP>(*io_service));
auto session = std::make_shared<Session>(this, std::make_shared<HTTP>(*io_service));
std::ostream stream(&session->request->content.streambuf);
stream << "GET /test/ HTTP/1.1\r\n";