unique_ptr for sockets

This commit is contained in:
Benjamin Sergeant
2020-03-24 12:40:58 -07:00
parent 9f818c7acf
commit 179e17895d
25 changed files with 54 additions and 51 deletions

View File

@ -92,7 +92,7 @@ namespace ix
return std::make_tuple(method, requestUri, httpVersion);
}
std::tuple<bool, std::string, HttpRequestPtr> Http::parseRequest(std::shared_ptr<Socket> socket)
std::tuple<bool, std::string, HttpRequestPtr> Http::parseRequest(std::unique_ptr<Socket>& socket)
{
HttpRequestPtr httpRequest;
@ -133,7 +133,7 @@ namespace ix
return std::make_tuple(true, "", httpRequest);
}
bool Http::sendResponse(HttpResponsePtr response, std::shared_ptr<Socket> socket)
bool Http::sendResponse(HttpResponsePtr response, std::unique_ptr<Socket>& socket)
{
// Write the response to the socket
std::stringstream ss;