diff options
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/asio_tls_server.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/asio_tls_server.cpp b/doc/examples/asio_tls_server.cpp index 0cf499e0a..28f499efe 100644 --- a/doc/examples/asio_tls_server.cpp +++ b/doc/examples/asio_tls_server.cpp @@ -257,7 +257,7 @@ size_t choose_thread_count() return 2; } -int main() +int main(int argc, char* argv[]) { try { @@ -267,7 +267,9 @@ int main() unsigned short port = 4434; tls_server server(io_service, port); - const size_t num_threads = choose_thread_count(); + size_t num_threads = choose_thread_count(); + if(argc == 2) + std::istringstream(argv[1]) >> num_threads; std::cout << "Using " << num_threads << " threads\n"; |