Skip to content

Commit

Permalink
Refactor handle_request method in server.cpp to return "Hello, World!…
Browse files Browse the repository at this point in the history
…" response
  • Loading branch information
riccardodebenedictis committed Apr 19, 2024
1 parent 80d790b commit 2d36e26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ namespace network
void server::handle_request(session &s, request &&req)
{
LOG_DEBUG(req);
s.enqueue(response{});
s.enqueue(string_response("Hello, World!"));
}
} // namespace network
1 change: 1 addition & 0 deletions src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace network
{
std::stringstream ss;
ss << res;
LOG_DEBUG(ss.str());
this->res.push(boost::asio::buffer(ss.str()));
if (this->res.size() == 1)
write();
Expand Down

0 comments on commit 2d36e26

Please sign in to comment.