summaryrefslogtreecommitdiffstats
path: root/src/lib/http
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2020-08-19 09:47:18 +0200
committerRazvan Becheriu <razvan@isc.org>2020-08-20 19:26:52 +0200
commitd5cf1467d6d19409fc2643ac3042629960f1dc62 (patch)
tree4172195922b5a30c22ae292f55517c0ac3fcee29 /src/lib/http
parent[#757] fixed documentation (diff)
downloadkea-d5cf1467d6d19409fc2643ac3042629960f1dc62.tar.xz
kea-d5cf1467d6d19409fc2643ac3042629960f1dc62.zip
[#1272] replaced out-of-bandwidth with out-of-bound and added other minor doxygen fixes
Diffstat (limited to 'src/lib/http')
-rw-r--r--src/lib/http/client.cc18
-rw-r--r--src/lib/http/client.h6
-rw-r--r--src/lib/http/tests/server_client_unittests.cc32
3 files changed, 28 insertions, 28 deletions
diff --git a/src/lib/http/client.cc b/src/lib/http/client.cc
index 65dd721bd4..f66f4b3079 100644
--- a/src/lib/http/client.cc
+++ b/src/lib/http/client.cc
@@ -490,7 +490,7 @@ public:
}
}
- /// @brief Closes a connection if it has an out-of-bandwidth socket event
+ /// @brief Closes a connection if it has an out-of-band socket event
///
/// If the pool contains a connection using the given socket and that
/// connection is currently in a transaction the method returns as this
@@ -502,12 +502,12 @@ public:
/// case is the other end of the socket being closed.
///
/// @param socket_fd socket descriptor to check
- void closeIfOutOfBandwidth(int socket_fd) {
+ void closeIfOutOfBand(int socket_fd) {
if (MultiThreadingMgr::instance().getMode()) {
std::lock_guard<std::mutex> lk(mutex_);
- closeIfOutOfBandwidthInternal(socket_fd);
+ closeIfOutOfBandInternal(socket_fd);
} else {
- closeIfOutOfBandwidthInternal(socket_fd);
+ closeIfOutOfBandInternal(socket_fd);
}
}
@@ -624,7 +624,7 @@ private:
queue_.clear();
}
- /// @brief Closes a connection if it has an out-of-bandwidth socket event
+ /// @brief Closes a connection if it has an out-of-band socket event
///
/// If the pool contains a connection using the given socket and that
/// connection is currently in a transaction the method returns as this
@@ -638,7 +638,7 @@ private:
/// This method should be called in a thread safe context.
///
/// @param socket_fd socket descriptor to check
- void closeIfOutOfBandwidthInternal(int socket_fd) {
+ void closeIfOutOfBandInternal(int socket_fd) {
// First we look for a connection with the socket.
for (auto conns_it = conns_.begin(); conns_it != conns_.end();
++conns_it) {
@@ -654,7 +654,7 @@ private:
}
// Socket has no transaction, so any ready event is
- // out-of-bandwidth (other end probably closed), so
+ // out-of-band (other end probably closed), so
// let's close it. Note we do not remove any queued
// requests, as this might somehow be occurring in
// between them.
@@ -1246,8 +1246,8 @@ HttpClient::asyncSendRequest(const Url& url, const HttpRequestPtr& request,
}
void
-HttpClient::closeIfOutOfBandwidth(int socket_fd) {
- return (impl_->conn_pool_->closeIfOutOfBandwidth(socket_fd));
+HttpClient::closeIfOutOfBand(int socket_fd) {
+ return (impl_->conn_pool_->closeIfOutOfBand(socket_fd));
}
void
diff --git a/src/lib/http/client.h b/src/lib/http/client.h
index 9b9aff751f..b772300e47 100644
--- a/src/lib/http/client.h
+++ b/src/lib/http/client.h
@@ -191,7 +191,7 @@ public:
/// @brief Closes all connections.
void stop();
- /// @brief Closes a connection if it has an out-of-bandwidth socket event
+ /// @brief Closes a connection if it has an out-of-band socket event
///
/// If the client owns a connection using the given socket and that
/// connection is currently in a transaction the method returns as this
@@ -199,11 +199,11 @@ public:
/// ongoing transaction, then the connection is closed.
///
/// This is method is intended to be used to detect and clean up then
- /// sockets that are marked ready outside of transactions. The most comman
+ /// sockets that are marked ready outside of transactions. The most common
/// case is the other end of the socket being closed.
///
/// @param socket_fd socket descriptor to check
- void closeIfOutOfBandwidth(int socket_fd);
+ void closeIfOutOfBand(int socket_fd);
private:
diff --git a/src/lib/http/tests/server_client_unittests.cc b/src/lib/http/tests/server_client_unittests.cc
index 12c7e4c6c8..fa91b150de 100644
--- a/src/lib/http/tests/server_client_unittests.cc
+++ b/src/lib/http/tests/server_client_unittests.cc
@@ -1739,20 +1739,20 @@ public:
EXPECT_EQ(-1, monitor.registered_fd_);
}
- /// @brief Tests detection and handling out-of-bandwidth socket events
+ /// @brief Tests detection and handling out-of-band socket events
///
- /// It initiates a transacation and verifies that a mid-transacation call
- /// to HttpClient::closeIfOutOfBandwidth() has no affect on the connection.
- /// After succesful completion of the transaction, a second call is made
- /// HttpClient::closeIfOutOfBandwidth(). This should result in the connection
- /// being closed.
+ /// It initiates a transaction and verifies that a mid-transaction call
+ /// to HttpClient::closeIfOutOfBand() has no affect on the connection.
+ /// After successful completion of the transaction, a second call to
+ /// HttpClient::closeIfOutOfBand() is made. This should result in the
+ /// connection being closed.
/// This step is repeated to verify that after an OOB closure, transactions
/// to the same destination can be processed.
///
/// Lastly, we verify that HttpClient::stop() closes the connection correctly.
///
/// @param version HTTP version to be used.
- void testCloseIfOutOfBandwidth(const HttpVersion& version) {
+ void testCloseIfOutOfBand(const HttpVersion& version) {
// Start the server.
ASSERT_NO_THROW(listener_.start());
@@ -1780,7 +1780,7 @@ public:
int orig_fd = monitor.registered_fd_;
// Test our socket for OOBness.
- client.closeIfOutOfBandwidth(monitor.registered_fd_);
+ client.closeIfOutOfBand(monitor.registered_fd_);
// Since we're in a transaction, we should have no closes and
// the same valid fd.
@@ -1812,7 +1812,7 @@ public:
EXPECT_GT(monitor.registered_fd_, -1);
// Test our socket for OOBness.
- client.closeIfOutOfBandwidth(monitor.registered_fd_);
+ client.closeIfOutOfBand(monitor.registered_fd_);
// Since we're in a transaction, we should have no closes and
// the same valid fd.
@@ -1838,7 +1838,7 @@ public:
int orig_fd = monitor.registered_fd_;
// Test our socket for OOBness.
- client.closeIfOutOfBandwidth(monitor.registered_fd_);
+ client.closeIfOutOfBand(monitor.registered_fd_);
// Since we're in a transaction, we should have no closes and
// the same valid fd.
@@ -2080,15 +2080,15 @@ TEST_F(HttpClientTest, connectCloseCallbacksMultiThreading) {
ASSERT_NO_FATAL_FAILURE(testConnectCloseCallbacks(HttpVersion(1, 1)));
}
-/// Tests that HttpClient::closeIfOutOfBandwidth works correctly.
-TEST_F(HttpClientTest, closeIfOutOfBandwidth) {
- ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBandwidth(HttpVersion(1, 1)));
+/// Tests that HttpClient::closeIfOutOfBand works correctly.
+TEST_F(HttpClientTest, closeIfOutOfBand) {
+ ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBand(HttpVersion(1, 1)));
}
-/// Tests that HttpClient::closeIfOutOfBandwidth works correctly.
-TEST_F(HttpClientTest, closeIfOutOfBandwidthMultiThreading) {
+/// Tests that HttpClient::closeIfOutOfBand works correctly.
+TEST_F(HttpClientTest, closeIfOutOfBandMultiThreading) {
MultiThreadingMgr::instance().setMode(true);
- ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBandwidth(HttpVersion(1, 1)));
+ ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBand(HttpVersion(1, 1)));
}
}