From 0f3a36a63053c24951071110f4e9cc6d2c3212cb Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 12 Mar 2014 10:46:33 -0400 Subject: [PATCH] Add define to allow disabling threading entirely, for when using an iostream-based client. --- websocketpp/config/core_client.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/websocketpp/config/core_client.hpp b/websocketpp/config/core_client.hpp index 51cfa85c79..1b2fae44aa 100644 --- a/websocketpp/config/core_client.hpp +++ b/websocketpp/config/core_client.hpp @@ -34,7 +34,11 @@ #include // Concurrency +#ifndef _WEBSOCKETPP_NO_THREADING_ #include +#else +#include +#endif // Transport #include @@ -68,7 +72,11 @@ struct core_client { typedef core_client type; // Concurrency policy +#ifndef _WEBSOCKETPP_NO_THREADING_ typedef websocketpp::concurrency::basic concurrency_type; +#else + typedef websocketpp::concurrency::none concurrency_type; +#endif // HTTP Parser Policies typedef http::parser::request request_type;