switch asio from standalone to boost
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# Common libraries to link for examples.
|
||||
set(EXAMPLE_LIBS
|
||||
webcc
|
||||
${Boost_LIBRARIES}
|
||||
"${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
if(WEBCC_ENABLE_SSL)
|
||||
|
||||
@@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
|
||||
std::cout << "Book photos will be saved to: " << photo_dir << std::endl;
|
||||
|
||||
try {
|
||||
webcc::Server server{ asio::ip::tcp::v4(), port };
|
||||
webcc::Server server{ boost::asio::ip::tcp::v4(), port };
|
||||
|
||||
server.Route("/books",
|
||||
std::make_shared<BookListView>(),
|
||||
|
||||
@@ -45,7 +45,7 @@ int main(int argc, char* argv[]) {
|
||||
std::uint16_t port = static_cast<std::uint16_t>(std::atoi(argv[1]));
|
||||
|
||||
try {
|
||||
webcc::Server server{ asio::ip::tcp::v4(), port };
|
||||
webcc::Server server{ boost::asio::ip::tcp::v4(), port };
|
||||
|
||||
server.Route("/upload", std::make_shared<FileUploadView>(), { "POST" });
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ int main(int argc, const char* argv[]) {
|
||||
LOG_USER("Sleep seconds: %d", sleep_seconds);
|
||||
|
||||
try {
|
||||
webcc::Server server{ asio::ip::tcp::v4(), 8080 };
|
||||
webcc::Server server{ boost::asio::ip::tcp::v4(), 8080 };
|
||||
|
||||
auto view = std::make_shared<HelloView>(sleep_seconds);
|
||||
server.Route("/", view);
|
||||
|
||||
@@ -17,7 +17,7 @@ int main() {
|
||||
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
|
||||
|
||||
try {
|
||||
webcc::Server server{ asio::ip::tcp::v4(), 8080 };
|
||||
webcc::Server server{ boost::asio::ip::tcp::v4(), 8080 };
|
||||
|
||||
server.Route("/", std::make_shared<HelloView>());
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
|
||||
std::string doc_root = argv[2];
|
||||
|
||||
try {
|
||||
webcc::Server server{ asio::ip::tcp::v4(), port, doc_root };
|
||||
webcc::Server server{ boost::asio::ip::tcp::v4(), port, doc_root };
|
||||
|
||||
if (argc == 4) {
|
||||
server.set_file_chunk_size(std::atoi(argv[3]));
|
||||
|
||||
Reference in New Issue
Block a user