aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/http_connection.h')
-rw-r--r--include/http_connection.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/http_connection.h b/include/http_connection.h
index 3232476..907485f 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -26,8 +26,8 @@ namespace crow
class Connection
{
public:
- Connection(tcp::socket&& socket, Handler* handler, const std::string& server_name)
- : socket_(std::move(socket)),
+ Connection(boost::asio::io_service& io_service, Handler* handler, const std::string& server_name)
+ : socket_(io_service),
handler_(handler),
parser_(this),
server_name_(server_name)
@@ -48,6 +48,11 @@ namespace crow
#endif
}
+ tcp::socket& socket()
+ {
+ return socket_;
+ }
+
void start()
{
//auto self = this->shared_from_this();