Skip to content

Commit 4d1b104

Browse files
committed
Implement the example for timer and http keep-alive server, and fix the bug for http 1.0 server
1 parent c47b2e1 commit 4d1b104

File tree

11 files changed

+1994
-42
lines changed

11 files changed

+1994
-42
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ find_package(Threads REQUIRED)
5252

5353

5454
#--------------------for the macro definitions start--------------------
55-
add_definitions(-DFMT_HEADER_ONLY)
5655
#--------------------for the macro definitions end--------------------
5756

5857

@@ -104,9 +103,15 @@ if(NOT NO_EXAMPLES)
104103
target_link_libraries(async_echo_client2 spinet_static Threads::Threads)
105104

106105
add_executable(http_server_simple ${PROJECT_SOURCE_DIR}/example/http/simple/server.cpp)
106+
target_include_directories(http_server_simple PUBLIC ${PROJECT_SOURCE_DIR}/example/http/include)
107107
target_compile_options(http_server_simple PUBLIC -Wno-unused-parameter)
108108
target_link_libraries(http_server_simple spinet_static Threads::Threads)
109109

110+
add_executable(http_server_keep_alive ${PROJECT_SOURCE_DIR}/example/http/keep_alive/server.cpp)
111+
target_include_directories(http_server_keep_alive PUBLIC ${PROJECT_SOURCE_DIR}/example/http/include)
112+
target_compile_options(http_server_keep_alive PUBLIC -Wno-unused-parameter)
113+
target_link_libraries(http_server_keep_alive spinet_static Threads::Threads)
114+
110115
add_executable(address_resolve ${PROJECT_SOURCE_DIR}/example/address/resolve.cpp)
111116
target_compile_options(address_resolve PUBLIC -Wno-unused-parameter)
112117
target_link_libraries(address_resolve spinet_static Threads::Threads)

0 commit comments

Comments
 (0)