diff --git a/.gitignore b/.gitignore index 8a7add9..864c638 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ build .cache + +TODO.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 48fe0a2..3e22a18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,14 +16,14 @@ FetchContent_Declare( execution # SOURCE_DIR ${CMAKE_SOURCE_DIR}/../execution GIT_REPOSITORY https://github.com/bemanproject/execution - GIT_TAG e43fc56 + GIT_TAG c587808 ) FetchContent_MakeAvailable(execution) FetchContent_Declare( task # SOURCE_DIR ${CMAKE_SOURCE_DIR}/../task GIT_REPOSITORY https://github.com/bemanproject/task - GIT_TAG 0495d7f + GIT_TAG 74aa210 ) FetchContent_MakeAvailable(task) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 7dd59d7..79c863b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -4,6 +4,7 @@ # cmake-format: on set(EXAMPLES + http-warwick taps client cppcon-2024 diff --git a/examples/data/index-warwick.html b/examples/data/index-warwick.html new file mode 100644 index 0000000..bf90688 --- /dev/null +++ b/examples/data/index-warwick.html @@ -0,0 +1,15 @@ + + + Hello Warwick Programming Club! + + + +

Hello Warwick Programming Club!

+ + + + + +
+ + diff --git a/examples/data/warwick-logo.png b/examples/data/warwick-logo.png new file mode 100644 index 0000000..159dc56 Binary files /dev/null and b/examples/data/warwick-logo.png differ diff --git a/examples/data/warwick-qr1.png b/examples/data/warwick-qr1.png new file mode 100644 index 0000000..9756320 Binary files /dev/null and b/examples/data/warwick-qr1.png differ diff --git a/examples/data/warwick-qr2.png b/examples/data/warwick-qr2.png new file mode 100644 index 0000000..fa06e56 Binary files /dev/null and b/examples/data/warwick-qr2.png differ diff --git a/examples/http-warwick.cpp b/examples/http-warwick.cpp new file mode 100644 index 0000000..0165a84 --- /dev/null +++ b/examples/http-warwick.cpp @@ -0,0 +1,32 @@ +// examples/http-server.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include +#include +#include "demo_algorithm.hpp" +#include "demo_error.hpp" +#include "demo_task.hpp" +#include "demo_scope.hpp" +#include +#include +#include +#include +#include +#include + +namespace ex = beman::execution; +namespace net = beman::net; +using namespace std::chrono_literals; + +// ---------------------------------------------------------------------------- + +std::unordered_map files{ + {"/", "examples/data/index-warwick.html"}, + {"/favicon.ico", "examples/data/favicon.ico"}, + {"/logo.png", "examples/data/warwick-logo.png"}, + {"/warwick-qr1.png", "examples/data/warwick-qr1.png"}, + {"/warwick-qr2.png", "examples/data/warwick-qr2.png"}, +}; + +auto main() -> int {}