Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@

build
.cache

TODO.txt
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# cmake-format: on

set(EXAMPLES
http-warwick
taps
client
cppcon-2024
Expand Down
15 changes: 15 additions & 0 deletions examples/data/index-warwick.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html>
<head>
<title>Hello Warwick Programming Club!</title>
</head>
<body>
<img src="/logo.png"/>
<h1>Hello Warwick Programming Club!</h1>
<table>
<tr>
<td><img width="400px" height="400px" src="/warwick-qr1.png"/></td>
<td><img width="480px" height="400px" src="/warwick-qr2.png"/></td>
</tr>
</table>
</body>
</html>
Binary file added examples/data/warwick-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/data/warwick-qr1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/data/warwick-qr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions examples/http-warwick.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// examples/http-server.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/net/net.hpp>
#include <beman/execution/execution.hpp>
#include <beman/execution/task.hpp>
#include "demo_algorithm.hpp"
#include "demo_error.hpp"
#include "demo_task.hpp"
#include "demo_scope.hpp"
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <string_view>
#include <unordered_map>

namespace ex = beman::execution;
namespace net = beman::net;
using namespace std::chrono_literals;

// ----------------------------------------------------------------------------

std::unordered_map<std::string, std::string> 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 {}
Loading