HttpListener::RequestTimeout(TIMEOUT_AGENT_RECEIVE_COMMAND),
HttpListener::IdleTimeout(TIMEOUT_AGENT_IDLE_CONNECTION_TIMEOUT)));
- // Create the thread pooi with immediate start.
+ // Create the thread pool with immediate start.
threads_.reset(new HttpThreadPool(thread_io_service_, thread_pool_size_));
// Instruct the HTTP listener to actually open socket, install
/// configured thread pool size.
///
/// @note This class is NOT compatible with Kea core single-threading.
-/// It is incumbant upon the owner to ensure the Kea core multi-threading
+/// It is incumbent upon the owner to ensure the Kea core multi-threading
/// is (or will be) enabled when creating instances of this class.
class CmdHttpListener {
public:
}
}
- /// @brief Determines if the listner should be paused.
+ /// @brief Determines if the listener should be paused.
///
/// @param num_pauses desired number of pauses
/// @param num_done number of clients that have completed their requests.
///
/// @return True if the listener should be paused.
bool shouldPause(size_t num_pauses, size_t num_done) {
- // True if the number of clients done is a mulitple of the number of pauses.
+ // True if the number of clients done is a multiple of the number of pauses.
return (!paused_ && num_pauses && num_done && !(num_done % num_pauses));
}
EXPECT_FALSE(listener_->getThreadIOService()->stopped());
// Verify we can pause it. We should still be listening, threads intact,
- // IOservice stopped, state set to PAUSED.
+ // IOService stopped, state set to PAUSED.
ASSERT_NO_THROW_LOG(listener_->pause());
ASSERT_TRUE(listener_->isPaused());
EXPECT_EQ(listener_->getThreadCount(), 4);
const CloseHandler& close_callback =
CloseHandler());
- /// @brief Starts client's thread pool, if mult-threaded.
+ /// @brief Starts client's thread pool, if multi-threaded.
void start();
/// @brief Halts client-side IO activity.
// Set state to RUN.
setRunState(RunState::RUN);
- // Prep IOservice for run() invocations.
+ // Prep IOService for run() invocations.
io_service_->restart();
// Create a pool of threads, each calls run() on our
// Stop our IOService.
if (!io_service_->stopped()) {
- // Flush cancelled (and ready) handlers.
+ // Flush canceled (and ready) handlers.
io_service_->poll();
// Stop the service
/// of threads is fixed at this value.
/// @param defer_start If true, creation of the threads is deferred until a subsequent
/// call to @ref start(). In this case the pool's operational state post construction
- /// is STOPPED. If false, the construtor will invoke start() which will create the
+ /// is STOPPED. If false, the constructor will invoke start() which will create the
/// threads, placing the pool in RUN state.
HttpThreadPool(asiolink::IOServicePtr io_service, size_t pool_size, bool defer_start = false);
/// than STOPPED.
void start();
- /// @brief Tranisitions the pool to STOPPED state.
+ /// @brief Transitions the pool to STOPPED state.
///
/// It stops the pool by doing the following:
/// -# Sets the state to SHUTDOWN.
ASSERT_NO_THROW(client_->stop());
}
- /// @brief Verifies the client can be puased and shutdown while doing work.
+ /// @brief Verifies the client can be paused and shutdown while doing work.
///
/// @param num_threads number of threads the HttpClient should use.
/// A value of 0 puts the HttpClient in single-threaded mode.
}
}
- // Loop until the 1/2 the reuests are done, an error occurs,
+ // Loop until the 1/2 the requests are done, an error occurs,
// or the time runs out.
size_t rr_count = 0;
while (rr_count < (expected_requests_)) {