Skip to content

boost beast example#2

Merged
StephanKa merged 8 commits intoZuehlke:mainfrom
StephanKa:feature/add-boost-beast-example
Apr 27, 2022
Merged

boost beast example#2
StephanKa merged 8 commits intoZuehlke:mainfrom
StephanKa:feature/add-boost-beast-example

Conversation

@StephanKa
Copy link
Copy Markdown
Collaborator

Small example for using boost beast and nlohman/json.
Is this enough for showing how it works or should more to be implemented?

Comment thread src/boost.beast/main.cpp Outdated
Comment thread src/boost.beast/data.h
Comment thread src/boost.beast/data.h Outdated
Comment thread src/boost.beast/helper.h Outdated
Comment thread src/boost.beast/listener.h Outdated
Comment thread src/boost.beast/main.cpp Outdated
Comment thread src/boost.beast/listener.h Outdated
Comment thread src/boost.beast/request.h Outdated
Comment thread src/boost.beast/request.h Outdated
Comment thread src/boost.beast/request.h Outdated
Comment thread src/boost.beast/session.h Outdated
@StephanKa StephanKa force-pushed the feature/add-boost-beast-example branch from b742e50 to 64e52f2 Compare September 29, 2021 18:37
@StephanKa StephanKa requested a review from arnemertz April 22, 2022 17:42
Comment thread src/boost.beast/error_handling.h Outdated
namespace beast = boost::beast;// from <boost/beast.hpp>
namespace http = beast::http;// from <boost/beast/http.hpp>
namespace asio = boost::asio;// from <boost/asio.hpp>
using tcp = boost::asio::ip::tcp;// from <boost/asio/ip/tcp.hpp>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these comments pass the .clang-format check?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/boost.beast/main.cpp Outdated
ioc.run();

return EXIT_SUCCESS;
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline missing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/boost.beast/request.h Outdated
return send(std::move(createResponse(req, http::status::internal_server_error, j)));
}
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline missing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/boost.beast/session.h Outdated
http::request<http::string_body> m_req;
std::shared_ptr<void> m_res;
sendLambda m_lambda;
}; No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline missing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Member

@arnemertz arnemertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Some newlines missing at ends of files (commented)
  • Not sure if the formatting passes the clang-format settings we have in place, please check

Otherwise looks good now! 👍🏼

@StephanKa StephanKa merged commit e506863 into Zuehlke:main Apr 27, 2022
@StephanKa StephanKa deleted the feature/add-boost-beast-example branch April 28, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants