diff options
author | lloyd <[email protected]> | 2014-01-10 23:07:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-10 23:07:16 +0000 |
commit | ad6555f522ae16f6284e8dafa02f630b88bcf289 (patch) | |
tree | bd63c51dbeab75eb0f90c72589bc922141237056 /src/cmd/tls_server_asio.cpp | |
parent | 6894dca64c04936d07048c0e8cbf7e25858548c3 (diff) |
Split up docs into the reference manual, the website, and everything else.
Add `website` target to makefile.
Some progress towards fixing minimized builds.
TLS now hard requires ECDSA and GCM since otherwise a minimized build
has only insecure options.
Remove boost_thread dependency in command line tool
Diffstat (limited to 'src/cmd/tls_server_asio.cpp')
-rw-r--r-- | src/cmd/tls_server_asio.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd/tls_server_asio.cpp b/src/cmd/tls_server_asio.cpp index b49206136..524181510 100644 --- a/src/cmd/tls_server_asio.cpp +++ b/src/cmd/tls_server_asio.cpp @@ -2,10 +2,11 @@ #include <iostream> #include <string> #include <vector> +#include <thread> #define _GLIBCXX_HAVE_GTHR_DEFAULT #include <boost/asio.hpp> #include <boost/bind.hpp> -#include <boost/thread.hpp> +//#include <boost/thread.hpp> #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> @@ -265,7 +266,7 @@ class asio_tls_server size_t choose_thread_count() { - size_t result = boost::thread::hardware_concurrency(); + size_t result = std::thread::hardware_concurrency(); if(result) return result; @@ -291,12 +292,12 @@ int tls_server_asio_main(int argc, char* argv[]) std::cout << "Using " << num_threads << " threads\n"; - std::vector<boost::shared_ptr<boost::thread> > threads; + std::vector<boost::shared_ptr<std::thread> > threads; for(size_t i = 0; i != num_threads; ++i) { - boost::shared_ptr<boost::thread> thread( - new boost::thread( + boost::shared_ptr<std::thread> thread( + new std::thread( boost::bind(&boost::asio::io_service::run, &io_service))); threads.push_back(thread); } |