diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f6bd24..c735859 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,8 @@ ENDIF() # Find the required thread package on the platform SET(THREADS_PREFER_PTHREAD_FLAG ON) FIND_PACKAGE(Threads REQUIRED) - +FIND_PACKAGE(Boost REQUIRED) +include_directories(${Boost_INCLUDE_DIRS}) # Formatting utility search path set(TURTLE_SERVER_BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build_support") set(TURTLE_SERVER_CLANG_SEARCH_PATH "/usr/local/bin" "/usr/bin" "/usr/local/opt/llvm/bin" "/usr/local/opt/llvm@8/bin" "/usr/local/Cellar/llvm/8.0.1/bin") diff --git a/src/include/core/connection.h b/src/include/core/connection.h index 362c9bc..7460f72 100644 --- a/src/include/core/connection.h +++ b/src/include/core/connection.h @@ -17,7 +17,6 @@ #include #include #include - #include "core/buffer.h" #include "core/socket.h" #include "core/utils.h" diff --git a/src/include/core/looper.h b/src/include/core/looper.h index 467d234..206fdf6 100644 --- a/src/include/core/looper.h +++ b/src/include/core/looper.h @@ -16,6 +16,7 @@ #include #include // NOLINT #include +#include #include #include // NOLINT @@ -59,7 +60,7 @@ class Looper { private: std::unique_ptr poller_; std::mutex mtx_; - std::map> connections_; + boost::unordered_flat_map> connections_; bool exit_{false}; }; } // namespace TURTLE_SERVER