]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3112] renamed run_one and get_io_service to camelCase
authorRazvan Becheriu <razvan@isc.org>
Mon, 30 Oct 2023 20:16:08 +0000 (22:16 +0200)
committerRazvan Becheriu <razvan@isc.org>
Mon, 11 Dec 2023 07:52:05 +0000 (09:52 +0200)
71 files changed:
src/bin/agent/ca_process.cc
src/bin/agent/tests/ca_command_mgr_unittests.cc
src/bin/agent/tests/ca_process_unittests.cc
src/bin/d2/d2_process.cc
src/bin/d2/tests/d2_process_unittests.cc
src/bin/d2/tests/d2_queue_mgr_unittests.cc
src/bin/dhcp4/dhcp4_lexer.cc
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.h
src/bin/dhcp4/dhcp4to6_ipc.cc
src/bin/dhcp4/tests/dhcp4_client.cc
src/bin/dhcp4/tests/kea_controller_unittest.cc
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/dhcp6_srv.h
src/bin/dhcp6/tests/dhcp6_client.cc
src/bin/dhcp6/tests/kea_controller_unittest.cc
src/bin/netconf/netconf_process.cc
src/bin/netconf/tests/control_socket_unittests.cc
src/bin/netconf/tests/netconf_process_unittests.cc
src/bin/netconf/tests/netconf_unittests.cc
src/hooks/dhcp/high_availability/ha.dox
src/hooks/dhcp/high_availability/tests/ha_mt_unittest.cc
src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc
src/hooks/dhcp/high_availability/tests/ha_test.cc
src/lib/asiodns/io_fetch.cc
src/lib/asiodns/tests/io_fetch_unittest.cc
src/lib/asiolink/botan_boost_tls.h
src/lib/asiolink/botan_tls.h
src/lib/asiolink/interval_timer.cc
src/lib/asiolink/io_acceptor.h
src/lib/asiolink/io_service.cc
src/lib/asiolink/io_service.h
src/lib/asiolink/io_service_signal.cc
src/lib/asiolink/openssl_tls.h
src/lib/asiolink/tcp_socket.h
src/lib/asiolink/tests/interval_timer_unittest.cc
src/lib/asiolink/tests/io_service_signal_unittests.cc
src/lib/asiolink/tests/io_service_unittest.cc
src/lib/asiolink/tests/process_spawn_unittest.cc
src/lib/asiolink/tests/tcp_acceptor_unittest.cc
src/lib/asiolink/tests/tcp_socket_unittest.cc
src/lib/asiolink/tests/tls_acceptor_unittest.cc
src/lib/asiolink/tests/tls_socket_unittest.cc
src/lib/asiolink/tests/tls_unittest.cc
src/lib/asiolink/tests/udp_socket_unittest.cc
src/lib/asiolink/tests/unix_domain_socket_unittest.cc
src/lib/asiolink/testutils/test_server_unix_socket.cc
src/lib/asiolink/testutils/test_server_unix_socket.h
src/lib/asiolink/udp_socket.h
src/lib/asiolink/unix_domain_socket.cc
src/lib/config/client_connection.h
src/lib/config/tests/client_connection_unittests.cc
src/lib/d2srv/tests/dns_client_unittests.cc
src/lib/d2srv/testutils/nc_test_utils.cc
src/lib/d2srv/testutils/nc_test_utils.h
src/lib/dhcp_ddns/ncr_io.cc
src/lib/dhcp_ddns/ncr_udp.cc
src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc
src/lib/dhcpsrv/tests/cfg_iface_unittest.cc
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
src/lib/dhcpsrv/tests/timer_mgr_unittest.cc
src/lib/http/tests/server_client_unittests.cc
src/lib/http/tests/test_http_client.h
src/lib/http/tests/tls_client_unittests.cc
src/lib/http/tests/tls_server_unittests.cc
src/lib/process/d_process.h
src/lib/process/testutils/d_test_stubs.cc
src/lib/tcp/tests/tcp_listener_unittests.cc
src/lib/tcp/tests/tcp_test_client.h
src/lib/tcp/tests/tls_listener_unittests.cc

index 0bc8d68a377ed647f883347cdd0408b8584cebb6..9e6665ff98fd8ca7d606dfc45d79c1959b83cc27 100644 (file)
@@ -88,9 +88,9 @@ CtrlAgentProcess::run() {
 
 size_t
 CtrlAgentProcess::runIO() {
-    size_t cnt = getIoService()->get_io_service().poll();
+    size_t cnt = getIOService()->getIOService().poll();
     if (!cnt) {
-        cnt = getIoService()->get_io_service().run_one();
+        cnt = getIOService()->getIOService().run_one();
     }
     return (cnt);
 }
@@ -164,7 +164,7 @@ CtrlAgentProcess::configure(isc::data::ConstElementPtr config_set,
             // Create http listener. It will open up a TCP socket and be
             // prepared to accept incoming connection.
             HttpListenerPtr http_listener
-                (new HttpListener(*getIoService(), server_address,
+                (new HttpListener(*getIOService(), server_address,
                                   server_port, tls_context, rcf,
                                   HttpListener::RequestTimeout(TIMEOUT_AGENT_RECEIVE_COMMAND),
                                   HttpListener::IdleTimeout(TIMEOUT_AGENT_IDLE_CONNECTION_TIMEOUT)));
@@ -208,7 +208,7 @@ CtrlAgentProcess::garbageCollectListeners(size_t leaving) {
         }
         // We have stopped listeners but there may be some pending handlers
         // related to these listeners. Need to invoke these handlers.
-        getIoService()->get_io_service().poll();
+        getIOService()->getIOService().poll();
         // Finally, we're ready to remove no longer used listeners.
         http_listeners_.erase(http_listeners_.begin(),
                               http_listeners_.end() - leaving);
index 6353916be140e904732828058539de9797072e12..275961bd695e2c796ea346290bacaced5b15616a 100644 (file)
@@ -248,7 +248,7 @@ public:
 
         // We have some cancelled operations for which we need to invoke the
         // handlers with the operation_aborted error code.
-        getIOService()->get_io_service().reset();
+        getIOService()->getIOService().reset();
         getIOService()->poll();
 
         EXPECT_EQ(expected_responses, server_socket_->getResponseNum());
@@ -413,7 +413,7 @@ TEST_F(CtrlAgentCommandMgrTest, forwardListCommands) {
 
     // We have some cancelled operations for which we need to invoke the
     // handlers with the operation_aborted error code.
-    getIOService()->get_io_service().reset();
+    getIOService()->getIOService().reset();
     getIOService()->poll();
 
     // Answer of 3 is specific to the stub response we send when the
index 37e06f66edf8485eecc75922143a0d1d6f86e628..6f9bd12d97ac0ff5c7eb9bdd466af9a962181ec4 100644 (file)
@@ -67,7 +67,7 @@ TEST(CtrlAgentProcess, construction) {
 TEST_F(CtrlAgentProcessTest, shutdown) {
     // Use an asiolink IntervalTimer and callback to generate the
     // shutdown invocation. (Note IntervalTimer setup is in milliseconds).
-    IntervalTimer timer(*getIoService());
+    IntervalTimer timer(*getIOService());
     timer.setup(std::bind(&CtrlAgentProcessTest::genShutdownCallback, this),
                 200);
 
index 2eef4a3371f67c44989f60abbb818153407cfb60..5cfcda6422cf9e1c72e5ff436aee37bc082519b9 100644 (file)
@@ -58,13 +58,13 @@ D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service)
     // been received.  This means that until we receive the configuration,
     // D2 will neither receive nor process NameChangeRequests.
     // Pass in IOService for NCR IO event processing.
-    queue_mgr_.reset(new D2QueueMgr(getIoService()));
+    queue_mgr_.reset(new D2QueueMgr(getIOService()));
 
     // Instantiate update manager.
     // Pass in both queue manager and configuration manager.
     // Pass in IOService for DNS update transaction IO event processing.
     D2CfgMgrPtr tmp = getD2CfgMgr();
-    update_mgr_.reset(new D2UpdateMgr(queue_mgr_, tmp, getIoService()));
+    update_mgr_.reset(new D2UpdateMgr(queue_mgr_, tmp, getIOService()));
 
     // Initialize stats manager.
     D2Stats::init();
@@ -73,7 +73,7 @@ D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service)
 void
 D2Process::init() {
     // CommandMgr uses IO service to run asynchronous socket operations.
-    isc::config::CommandMgr::instance().setIOService(getIoService());
+    isc::config::CommandMgr::instance().setIOService(getIOService());
 };
 
 void
@@ -131,24 +131,22 @@ size_t
 D2Process::runIO() {
     // We want to block until at least one handler is called.  We'll use
     // boost::asio::io_service directly for two reasons. First off
-    // asiolink::IOService::run_one is a void and boost::asio::io_service::stopped
+    // asiolink::IOService::runOne is a void and boost::asio::io_service::stopped
     // is not present in older versions of boost.  We need to know if any
     // handlers ran or if the io_service was stopped.  That latter represents
     // some form of error and the application cannot proceed with a stopped
     // service.  Secondly, asiolink::IOService does not provide the poll
     // method.  This is a handy method which runs all ready handlers without
     // blocking.
-    asiolink::IOServicePtr& io = getIoService();
-    boost::asio::io_service& asio_io_service = io->get_io_service();
 
     // Poll runs all that are ready. If none are ready it returns immediately
     // with a count of zero.
-    size_t cnt = asio_io_service.poll();
+    size_t cnt = getIOService()->getIOService().poll();
     if (!cnt) {
         // Poll ran no handlers either none are ready or the service has been
         // stopped.  Either way, call run_one to wait for a IO event. If the
         // service is stopped it will return immediately with a cnt of zero.
-        cnt = asio_io_service.run_one();
+        cnt = getIOService()->getIOService().run_one();
     }
 
     return (cnt);
@@ -283,7 +281,7 @@ D2Process::configure(isc::data::ConstElementPtr config_set, bool check_only) {
     if (HooksManager::calloutsPresent(Hooks.hooks_index_d2_srv_configured_)) {
         CalloutHandlePtr callout_handle = HooksManager::createCalloutHandle();
 
-        callout_handle->setArgument("io_context", getIoService());
+        callout_handle->setArgument("io_context", getIOService());
         callout_handle->setArgument("json_config", config_set);
         callout_handle->setArgument("server_config",
                                     getD2CfgMgr()->getD2CfgContext());
index fd2f8f58b1ce8993868019efa4d5cf72ec5bcdff..e2e11b2a742ba0886312743c4fe2e06a8c8925cb 100644 (file)
@@ -561,7 +561,7 @@ TEST_F(D2ProcessTest, canShutdown) {
 TEST_F(D2ProcessTest, normalShutdown) {
     // Use an asiolink IntervalTimer and callback to generate the
     // shutdown invocation. (Note IntervalTimer setup is in milliseconds).
-    isc::asiolink::IntervalTimer timer(*getIoService());
+    isc::asiolink::IntervalTimer timer(*getIOService());
     timer.setup(std::bind(&D2ProcessTest::genShutdownCallback, this),
                 2 * 1000);
 
@@ -585,7 +585,7 @@ TEST_F(D2ProcessTest, normalShutdown) {
 TEST_F(D2ProcessTest, fatalErrorShutdown) {
     // Use an asiolink IntervalTimer and callback to generate the
     // the exception.  (Note IntervalTimer setup is in milliseconds).
-    isc::asiolink::IntervalTimer timer(*getIoService());
+    isc::asiolink::IntervalTimer timer(*getIOService());
     timer.setup(std::bind(&D2ProcessTest::genFatalErrorCallback, this),
                 2 * 1000);
 
index 270de6a9d3e5f35c6e483775d96d24785f6a477e..e5e3f117aef6f84590cdd70741e91bc691ffbcd9 100644 (file)
@@ -300,7 +300,7 @@ TEST_F (QueueMgrUDPTest, stateModel) {
 
     // Stopping requires IO cancel, which result in a callback.
     // So process one event and verify we are STOPPED.
-    io_service_->run_one();
+    io_service_->runOne();
     EXPECT_EQ(D2QueueMgr::STOPPED, queue_mgr_->getMgrState());
 
     // Verify that we can re-enter the RUNNING from STOPPED by starting the
@@ -317,7 +317,7 @@ TEST_F (QueueMgrUDPTest, stateModel) {
 
     // Stopping requires IO cancel, which result in a callback.
     // So process one event and verify we are STOPPED.
-    io_service_->run_one();
+    io_service_->runOne();
     EXPECT_EQ(D2QueueMgr::STOPPED, queue_mgr_->getMgrState());
 
     // Verify that we can remove the listener in the STOPPED state and
@@ -370,8 +370,8 @@ TEST_F (QueueMgrUDPTest, liveFeed) {
         ASSERT_NO_THROW(sender_->sendRequest(send_ncr));
 
         // running two should do the send then the receive
-        io_service_->run_one();
-        io_service_->run_one();
+        io_service_->runOne();
+        io_service_->runOne();
 
         // Verify that the request can be added to the queue and queue
         // size increments accordingly.
@@ -401,8 +401,8 @@ TEST_F (QueueMgrUDPTest, liveFeed) {
         ASSERT_NO_THROW(sender_->sendRequest(send_ncr));
 
         // running two should do the send then the receive
-        EXPECT_NO_THROW(io_service_->run_one());
-        EXPECT_NO_THROW(io_service_->run_one());
+        EXPECT_NO_THROW(io_service_->runOne());
+        EXPECT_NO_THROW(io_service_->runOne());
         EXPECT_EQ(i+1, queue_mgr_->getQueueSize());
     }
 
@@ -418,11 +418,11 @@ TEST_F (QueueMgrUDPTest, liveFeed) {
 
     // Send another. The send should succeed.
     ASSERT_NO_THROW(sender_->sendRequest(send_ncr));
-    EXPECT_NO_THROW(io_service_->run_one());
+    EXPECT_NO_THROW(io_service_->runOne());
 
     // Now execute the receive which should not throw but should move us
     // to STOPPED_QUEUE_FULL state.
-    EXPECT_NO_THROW(io_service_->run_one());
+    EXPECT_NO_THROW(io_service_->runOne());
     EXPECT_EQ(D2QueueMgr::STOPPED_QUEUE_FULL, queue_mgr_->getMgrState());
 
     // Verify queue size did not increase beyond max.
@@ -447,10 +447,10 @@ TEST_F (QueueMgrUDPTest, liveFeed) {
     // Verify that we can again receive requests.
     // Send should be fine.
     ASSERT_NO_THROW(sender_->sendRequest(send_ncr));
-    EXPECT_NO_THROW(io_service_->run_one());
+    EXPECT_NO_THROW(io_service_->runOne());
 
     // Receive should succeed.
-    EXPECT_NO_THROW(io_service_->run_one());
+    EXPECT_NO_THROW(io_service_->runOne());
     EXPECT_EQ(1, queue_mgr_->getQueueSize());
 }
 
index a6cc8876a7786302ee7b7cce9590aea3ec0cf3ac..d97adc3bef832a0c1ef5debdc94d1b161d43f3ba 100644 (file)
@@ -1,6 +1,6 @@
-#line 1 "dhcp4_lexer.cc"
+#line 2 "dhcp4_lexer.cc"
 
-#line 3 "dhcp4_lexer.cc"
+#line 4 "dhcp4_lexer.cc"
 
 #define  YY_INT_ALIGNED short int
 
@@ -2255,7 +2255,7 @@ using namespace isc::dhcp;
 
 /* To avoid the call to exit... oops! */
 #define YY_FATAL_ERROR(msg) isc::dhcp::Parser4Context::fatal(msg)
-#line 2258 "dhcp4_lexer.cc"
+#line 2259 "dhcp4_lexer.cc"
 /* noyywrap disables automatic rewinding for the next file to parse. Since we
    always parse only a single string, there's no need to do any wraps. And
    using yywrap requires linking with -lfl, which provides the default yywrap
@@ -2281,8 +2281,8 @@ using namespace isc::dhcp;
    by moving it ahead by yyleng bytes. yyleng specifies the length of the
    currently matched token. */
 #define YY_USER_ACTION  driver.loc_.columns(yyleng);
-#line 2284 "dhcp4_lexer.cc"
 #line 2285 "dhcp4_lexer.cc"
+#line 2286 "dhcp4_lexer.cc"
 
 #define INITIAL 0
 #define COMMENT 1
@@ -2610,7 +2610,7 @@ YY_DECL
     }
 
 
-#line 2613 "dhcp4_lexer.cc"
+#line 2614 "dhcp4_lexer.cc"
 
        while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
                {
@@ -5720,7 +5720,7 @@ YY_RULE_SETUP
 #line 2463 "dhcp4_lexer.ll"
 ECHO;
        YY_BREAK
-#line 5723 "dhcp4_lexer.cc"
+#line 5724 "dhcp4_lexer.cc"
 
        case YY_END_OF_BUFFER:
                {
index 71c385b96316e6421b3eb793cef3deb866e5e0ec..612e8aa58b73d1bd8076234e2635edcd6456ef19 100644 (file)
@@ -1020,7 +1020,7 @@ Dhcpv4Srv::run() {
     while (!shutdown_) {
 #endif // ENABLE_AFL
         try {
-            run_one();
+            runOne();
             getIOService()->poll();
         } catch (const std::exception& e) {
             // General catch-all exception that are not caught by more specific
@@ -1045,7 +1045,7 @@ Dhcpv4Srv::run() {
 }
 
 void
-Dhcpv4Srv::run_one() {
+Dhcpv4Srv::runOne() {
     // client's message and server's response
     Pkt4Ptr query;
 
@@ -1176,7 +1176,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
                                    *callout_handle);
 
         // Callouts decided to drop the received packet.
-        // The response (rsp) is null so the caller (run_one) will
+        // The response (rsp) is null so the caller (runOne) will
         // immediately return too.
         if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
             LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING,
index 8321a6a55b3ca71159dc38076e02de355242e7ea..0ed55adfe514437972dde555ead9d293fe593bde 100644 (file)
@@ -336,7 +336,7 @@ public:
     /// Main server processing step. Receives one incoming packet, calls
     /// the processing packet routing and (if necessary) transmits
     /// a response.
-    void run_one();
+    void runOne();
 
     /// @brief Process a single incoming DHCPv4 packet and sends the response.
     ///
index bf34028af0f26996599a548bc0b84436490c58ae..e3fbcf9abe04ef94091701e9f348dcea67b40706 100644 (file)
@@ -61,7 +61,7 @@ void Dhcp4to6Ipc::handler(int /* fd */) {
         // Receive message from the IPC socket.
         pkt = ipc.receive();
 
-        // from Dhcpv4Srv::run_one() after receivePacket()
+        // From Dhcpv4Srv::runOne() after receivePacket()
         if (pkt) {
             LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED)
                 .arg(static_cast<int>(pkt->getType()))
@@ -101,7 +101,7 @@ void Dhcp4to6Ipc::handler(int /* fd */) {
     // Extract the DHCPv4 packet with DHCPv6 packet attached
     Pkt4Ptr query(new Pkt4o6(msg->getData(), pkt));
 
-    // From Dhcpv4Srv::run_one() processing and after
+    // From Dhcpv4Srv::runOne() processing and after
     Pkt4Ptr rsp;
 
     ControlledDhcpv4Srv::getInstance()->processPacket(query, rsp, false);
index cb3e16ba95b69caa89415d0e538069b94b8969bf..ae466aa97ae5d898b4edf456ede93cdb4736e9c0 100644 (file)
@@ -563,9 +563,9 @@ Dhcp4Client::sendMsg(const Pkt4Ptr& msg) {
     srv_->fakeReceive(msg_copy);
 
     try {
-        // Invoke run_one instead of run, because we want to avoid triggering
+        // Invoke runOne instead of run, because we want to avoid triggering
         // IO service.
-        srv_->run_one();
+        srv_->runOne();
     } catch (...) {
         // Suppress errors, as the DHCPv4 server does.
     }
index ea5149fdb9b37d277c55a4f53deaff45376965bc..170a69d505f56352d829b3d4c85232106048238c 100644 (file)
@@ -239,9 +239,9 @@ public:
         // Run as long as the timeout hasn't occurred and the interrupting
         // condition is not specified or not met.
         while (!stopped && (!cond || !cond())) {
-            io_service->run_one();
+            io_service->runOne();
         }
-        io_service->get_io_service().reset();
+        io_service->getIOService().reset();
     }
 
     /// @brief This test verifies that the timer used to fetch the configuration
index 7be8d06ca39c9fd0c3b682357df0fa402e9d7ea0..60324d0c3f0c93b442abc00807ce45e969ca298b 100644 (file)
@@ -588,7 +588,8 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
     }
 }
 
-int Dhcpv6Srv::run() {
+int
+Dhcpv6Srv::run() {
 #ifdef ENABLE_AFL
     // Set up structures needed for fuzzing.
     Fuzz fuzzer(6, server_port_);
@@ -603,7 +604,7 @@ int Dhcpv6Srv::run() {
     while (!shutdown_) {
 #endif // ENABLE_AFL
         try {
-            run_one();
+            runOne();
             getIOService()->poll();
         } catch (const std::exception& e) {
             // General catch-all standard exceptions that are not caught by more
@@ -627,7 +628,8 @@ int Dhcpv6Srv::run() {
     return (getExitValue());
 }
 
-void Dhcpv6Srv::run_one() {
+void
+Dhcpv6Srv::runOne() {
     // client's message and server's response
     Pkt6Ptr query;
 
@@ -766,7 +768,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
         }
 
         // Callouts decided to drop the received packet
-        // The response (rsp) is null so the caller (run_one) will
+        // The response (rsp) is null so the caller (runOne) will
         // immediately return too.
         if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
             LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_BUFFER_RCVD_DROP)
index c439047e4b8dacb83a7b394d054f4d4061ccded5..e2c255d80950991a673a21cabc4d2b9a89057d3c 100644 (file)
@@ -147,7 +147,7 @@ public:
     /// Main server processing step. Receives one incoming packet, calls
     /// the processing packet routing and (if necessary) transmits
     /// a response.
-    void run_one();
+    void runOne();
 
     /// @brief Process a single incoming DHCPv6 packet and sends the response.
     ///
index 2ab1c9d227497e7f84b5d2ffe14f2024c34f5344..c5954023b3b05d75259f9620cea1064473158103 100644 (file)
@@ -973,9 +973,9 @@ Dhcp6Client::sendMsg(const Pkt6Ptr& msg) {
     srv_->fakeReceive(msg_copy);
 
     try {
-        // Invoke run_one instead of run, because we want to avoid triggering
+        // Invoke runOne instead of run, because we want to avoid triggering
         // IO service.
-        srv_->run_one();
+        srv_->runOne();
     } catch (...) {
         // Suppress errors, as the DHCPv6 server does.
     }
index eb06f34707bca2d6b8cfe0d760874af313facfb6..e7b7780affa5934ca0558a1b12e04ba835b8e316 100644 (file)
@@ -226,9 +226,9 @@ public:
         // Run as long as the timeout hasn't occurred and the interrupting
         // condition is not specified or not met.
         while (!stopped && (!cond || !cond())) {
-            io_service->run_one();
+            io_service->runOne();
         }
-        io_service->get_io_service().reset();
+        io_service->getIOService().reset();
     }
 
     /// @brief This test verifies that the timer used to fetch the configuration
index 559c4e5738cc214453417d823f619eb8aededa8d..4c334b6a6e04d959bf0ec8c15374eab2d783d57a 100644 (file)
@@ -65,9 +65,9 @@ NetconfProcess::run() {
 
 size_t
 NetconfProcess::runIO() {
-    size_t cnt = getIoService()->get_io_service().poll();
+    size_t cnt = getIOService()->getIOService().poll();
     if (!cnt) {
-        cnt = getIoService()->get_io_service().run_one();
+        cnt = getIOService()->getIOService().run_one();
     }
     return (cnt);
 }
index 22beff6d8d637703cac167c5543b0d97fb10511e..7208f083acb0eff239b634acf459da1db5e89371 100644 (file)
@@ -211,14 +211,14 @@ void
 UnixControlSocketTest::reflectServer() {
     // Acceptor.
     boost::asio::local::stream_protocol::acceptor
-        acceptor(io_service_.get_io_service());
+        acceptor(io_service_.getIOService());
     EXPECT_NO_THROW_LOG(acceptor.open());
     boost::asio::local::stream_protocol::endpoint
         endpoint(unixSocketFilePath());
     EXPECT_NO_THROW_LOG(acceptor.bind(endpoint));
     EXPECT_NO_THROW_LOG(acceptor.listen());
     boost::asio::local::stream_protocol::socket
-        socket(io_service_.get_io_service());
+        socket(io_service_.getIOService());
 
     // Ready.
     signalReady();
@@ -241,7 +241,7 @@ UnixControlSocketTest::reflectServer() {
                               accepted = true;
                           });
     while (!accepted && !timeout) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
     ASSERT_FALSE(ec);
 
@@ -255,7 +255,7 @@ UnixControlSocketTest::reflectServer() {
                              received = cnt;
                          });
     while (!received && !timeout) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
     ASSERT_FALSE(ec);
     rbuf.resize(received);
@@ -274,7 +274,7 @@ UnixControlSocketTest::reflectServer() {
                           sent = cnt;
                       });
     while (!sent && !timeout) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
     ASSERT_FALSE(ec);
 
@@ -562,7 +562,7 @@ public:
             signalReady();
             // Until stop() is called run IO service.
             while (!isStopping()) {
-                io_service_.run_one();
+                io_service_.runOne();
             }
             // Main thread signalled that the thread should
             // terminate. Launch any outstanding IO service
@@ -580,13 +580,13 @@ public:
 
     /// @brief Stop listener.
     ///
-    /// Post an empty action to finish current run_one.
+    /// Post an empty action to finish current runOne.
     void stop() {
         // Notify the thread that it should terminate.
         signalStopping();
         // If the thread is blocked on running the IO
         // service, post the empty handler to cause
-        // run_one to return.
+        // runOne to return.
         io_service_.post([]() { return; });
         // We asked that the thread stops. Let's wait
         // for it to signal that it has stopped.
index b71fdad7f347223b40c14f9762c8dc95d6640bd3..0b82b6bbee61467aa02203a6f12a4a3247dcfaaa 100644 (file)
@@ -63,7 +63,7 @@ TEST(NetconfProcess, construction) {
 TEST_F(NetconfProcessTest, shutdown) {
     // Use an asiolink IntervalTimer and callback to generate the
     // shutdown invocation. (Note IntervalTimer setup is in milliseconds).
-    IntervalTimer timer(*getIoService());
+    IntervalTimer timer(*getIOService());
     timer.setup(std::bind(&NetconfProcessTest::genShutdownCallback, this),
                 200);
 
index b1bff518987b8944ee608dcdcdbc16788b7668bd..26c3d7809b7f387a9367b1c2ccea8711298fd215 100644 (file)
@@ -259,7 +259,7 @@ void
 NetconfAgentTest::fakeServer() {
     // Acceptor.
     boost::asio::local::stream_protocol::acceptor
-        acceptor(io_service_->get_io_service());
+        acceptor(io_service_->getIOService());
     EXPECT_NO_THROW_LOG(acceptor.open());
     boost::asio::local::stream_protocol::endpoint
         endpoint(unixSocketFilePath());
@@ -268,7 +268,7 @@ NetconfAgentTest::fakeServer() {
     EXPECT_NO_THROW_LOG(acceptor.bind(endpoint));
     EXPECT_NO_THROW_LOG(acceptor.listen());
     boost::asio::local::stream_protocol::socket
-        socket(io_service_->get_io_service());
+        socket(io_service_->getIOService());
 
     // Ready.
     signalReady();
@@ -291,7 +291,7 @@ NetconfAgentTest::fakeServer() {
                               accepted = true;
                           });
     while (!accepted && !timeout) {
-        io_service_->run_one();
+        io_service_->runOne();
     }
     ASSERT_FALSE(ec);
 
@@ -305,7 +305,7 @@ NetconfAgentTest::fakeServer() {
                              received = cnt;
                          });
     while (!received && !timeout) {
-        io_service_->run_one();
+        io_service_->runOne();
     }
     ASSERT_FALSE(ec);
     rbuf.resize(received);
@@ -334,7 +334,7 @@ NetconfAgentTest::fakeServer() {
                           sent = cnt;
                       });
     while (!sent && !timeout) {
-        io_service_->run_one();
+        io_service_->runOne();
     }
     ASSERT_FALSE(ec);
 
index 257f5515886be6e7d6ce25371fea39bf8a6c85a7..e63eefd6bde5e7d9cd3083c212f4378f316f4896 100644 (file)
@@ -152,7 +152,7 @@ bool
 Dhcpv4Srv::run() {
     while (!shutdown_) {
         try {
-            run_one();
+            runOne();
             getIOService()->poll();
         } catch (const std::exception& e) {
             // General catch-all exception that are not caught by more specific
@@ -171,7 +171,7 @@ Dhcpv4Srv::run() {
 }
 @endcode
 
-The @c run_one() call includes a @c select() invocation with a timeout of
+The @c runOne() call includes a @c select() invocation with a timeout of
 1 second. The @c poll() is not invoked for at most 1 second while the server
 is performing this blocking @c select(). Future Kea releases should mitigate
 this problem by introducing some mechanisms for concurrent reception and
index 2749f92556211759cdb0970fecc481332bc3862f..ed9fa7d008afcba08057c7f3d3c1077bb2c5c38c 100644 (file)
@@ -134,7 +134,7 @@ public:
     ///
     /// Stops all test servers.
     ~HAMtServiceTest() {
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
         io_service_->poll();
         MultiThreadingMgr::instance().setMode(false);
         CmdResponseCreator::command_accept_list_.clear();
index d094cb4d46b9f7c147a10eeb9d2ea7bf11be7c1a..5a2ad58e2f182c6ac01ae686946d2f30f77e60ac 100644 (file)
@@ -624,7 +624,7 @@ public:
         listener_->stop();
         listener2_->stop();
         listener3_->stop();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
         io_service_->poll();
         MultiThreadingMgr::instance().setMode(false);
     }
@@ -2072,7 +2072,7 @@ public:
         // Stop the IO service. This should cause the thread to terminate.
         io_service_->stop();
         thread->join();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
         io_service_->poll();
     }
 
@@ -2122,7 +2122,7 @@ public:
         // Stop the IO service. This should cause the thread to terminate.
         io_service_->stop();
         thread->join();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
         io_service_->poll();
     }
 
@@ -4693,7 +4693,7 @@ TEST_F(HAServiceTest, processMaintenanceStartSuccess) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner of our server is online and should have responded with
@@ -4745,7 +4745,7 @@ TEST_F(HAServiceTest, processMaintenanceStartSuccessAuthorized) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner of our server is online and should have responded with
@@ -4788,7 +4788,7 @@ TEST_F(HAServiceTest, processMaintenanceStartPartnerDown) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner of our server is online and should have responded with
@@ -4832,7 +4832,7 @@ TEST_F(HAServiceTest, processMaintenanceStartPartnerError) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     ASSERT_TRUE(rsp);
@@ -4874,7 +4874,7 @@ TEST_F(HAServiceTest, processMaintenanceStartPartnerUnauthorized) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     ASSERT_TRUE(rsp);
@@ -4917,7 +4917,7 @@ TEST_F(HAServiceTest, processMaintenanceStartNotAllowed) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     ASSERT_TRUE(rsp);
@@ -4961,7 +4961,7 @@ TEST_F(HAServiceTest, processMaintenanceCancelSuccess) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner of our server is online and should have responded with
@@ -5012,7 +5012,7 @@ TEST_F(HAServiceTest, processMaintenanceCancelSuccessAuthorized) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner of our server is online and should have responded with
@@ -5055,7 +5055,7 @@ TEST_F(HAServiceTest, processMaintenanceCancelPartnerError) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner should have responded with an error.
@@ -5101,7 +5101,7 @@ TEST_F(HAServiceTest, processMaintenanceCancelPartnerUnauthorized) {
     // Stop the IO service. This should cause the thread to terminate.
     io_service_->stop();
     thread->join();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     io_service_->poll();
 
     // The partner should have responded with an error.
index 88ec2142e6749185537dfbadaa9fa0a7517b5b93..c95bb94df0b0d243e900cb4aa951c569d1ca56e2 100644 (file)
@@ -71,7 +71,7 @@ HATest::startHAService() {
 
 void
 HATest::runIOService(long ms) {
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     IntervalTimer timer(*io_service_);
     timer.setup(std::bind(&IOService::stop, io_service_), ms,
                 IntervalTimer::ONE_SHOT);
@@ -81,14 +81,14 @@ HATest::runIOService(long ms) {
 
 void
 HATest::runIOService(long ms, std::function<bool()> stop_condition) {
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
     IntervalTimer timer(*io_service_);
     bool timeout = false;
     timer.setup(std::bind(&HATest::stopIOServiceHandler, this, std::ref(timeout)),
                 ms, IntervalTimer::ONE_SHOT);
 
     while (!stop_condition() && !timeout) {
-        io_service_->run_one();
+        io_service_->runOne();
     }
 
     timer.cancel();
@@ -96,7 +96,7 @@ HATest::runIOService(long ms, std::function<bool()> stop_condition) {
 
 boost::shared_ptr<std::thread>
 HATest::runIOServiceInThread() {
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
 
     bool running = false;
     std::mutex mutex;
index 980a6009b65a23719a46dde3cfd80b136f29940c..239e282a4fc90026da83df16108c674bfbdf985d 100644 (file)
@@ -123,7 +123,7 @@ struct IOFetchData {
         msgbuf(new OutputBuffer(512)),
         received(buff),
         callback(cb),
-        timer(service.get_io_service()),
+        timer(service.getIOService()),
         protocol(proto),
         cumulative(0),
         expected(0),
index 628e8fd34bc2aabb20df58b56f7b9f3a8e4d568c..a06be0e11cb77765c82b03c7ab54762a9a923ac3 100644 (file)
@@ -101,7 +101,7 @@ public:
                                         // Timeout interval chosen to ensure no timeout
         protocol_(IOFetch::TCP),        // for initialization - will be changed
         cumulative_(0),
-        timer_(service_.get_io_service()),
+        timer_(service_.getIOService()),
         receive_buffer_(),
         expected_buffer_(new OutputBuffer(512)),
         send_buffer_(),
@@ -474,11 +474,11 @@ public:
         expected_ = IOFetch::STOPPED;
 
         // Post the query
-        service_.get_io_service().post(fetch);
+        service_.getIOService().post(fetch);
 
         // Post query_.stop() (yes, the std::bind thing is just
         // query_.stop()).
-        service_.get_io_service().post(
+        service_.getIOService().post(
             std::bind(&IOFetch::stop, fetch, IOFetch::STOPPED));
 
         // Run both of them.  run() returns when everything in the I/O service
@@ -501,7 +501,7 @@ public:
 
         // Stop before it is started
         fetch.stop();
-        service_.get_io_service().post(fetch);
+        service_.getIOService().post(fetch);
 
         service_.run();
         EXPECT_TRUE(run_);
@@ -517,7 +517,7 @@ public:
         protocol_ = protocol;
         expected_ = IOFetch::TIME_OUT;
 
-        service_.get_io_service().post(fetch);
+        service_.getIOService().post(fetch);
         service_.run();
         EXPECT_TRUE(run_);
     }
@@ -543,17 +543,17 @@ public:
         }
 
         // Socket into which the connection will be accepted.
-        tcp::socket socket(service_.get_io_service());
+        tcp::socket socket(service_.getIOService());
 
         // Acceptor object - called when the connection is made, the handler
         // will initiate a read on the socket.
-        tcp::acceptor acceptor(service_.get_io_service(),
+        tcp::acceptor acceptor(service_.getIOService(),
                                tcp::endpoint(tcp::v4(), TEST_PORT));
         acceptor.async_accept(socket,
             std::bind(&IOFetchTest::tcpAcceptHandler, this, &socket, ph::_1));
 
         // Post the TCP fetch object to send the query and receive the response.
-        service_.get_io_service().post(tcp_fetch_);
+        service_.getIOService().post(tcp_fetch_);
 
         // ... and execute all the callbacks.  This exits when the fetch
         // completes.
@@ -575,7 +575,7 @@ public:
         protocol_ = IOFetch::UDP;
 
         // Set up the server.
-        udp::socket socket(service_.get_io_service(), udp::v4());
+        udp::socket socket(service_.getIOService(), udp::v4());
         socket.set_option(socket_base::reuse_address(true));
         socket.bind(udp::endpoint(TEST_HOST, TEST_PORT));
         return_data_ = "Message returned to the client";
@@ -587,7 +587,7 @@ public:
                                   std::bind(&IOFetchTest::udpReceiveHandler,
                                             this, &remote, &socket,
                                             ph::_1, ph::_2, bad_qid, second_send));
-        service_.get_io_service().post(udp_fetch_);
+        service_.getIOService().post(udp_fetch_);
         if (debug_) {
             cout << "udpSendReceive: async_receive_from posted,"
                 "waiting for callback" << endl;
index 9037ebc35379b9b8eb033f26b5d95ef41d35ae65..abfef2354c443c79f909b017e789a7759751d085 100644 (file)
@@ -108,7 +108,7 @@ typedef Botan::TLS::Stream<boost::asio::ip::tcp::socket> TlsStreamImpl;
 template <typename Callback, typename TlsStreamImpl>
 TlsStreamBase<Callback, TlsStreamImpl>::
 TlsStreamBase(IOService& service, TlsContextPtr context)
-    : TlsStreamImpl(service.get_io_service(), context->getContext()),
+    : TlsStreamImpl(service.getIOService(), context->getContext()),
       role_(context->getRole()) {
 }
 
index 1735cc757c447323d4358e1507d8c41b6c834a3c..6197ef8344442a0e78f033814c9ba0ff87e1e2a0 100644 (file)
@@ -96,7 +96,7 @@ typedef boost::asio::ip::tcp::socket TlsStreamImpl;
 template <typename Callback, typename TlsStreamImpl>
 TlsStreamBase<Callback, TlsStreamImpl>::
 TlsStreamBase(IOService& service, TlsContextPtr context)
-    : TlsStreamImpl(service.get_io_service()), role_(context->getRole()) {
+    : TlsStreamImpl(service.getIOService()), role_(context->getRole()) {
 }
 
 /// @brief Botan fake TLS stream.
index 18088cb81fc77c3d753bebfe1c276c670586ba36..2d83e6350b01faf1a87050cd617bc045b2acb396 100644 (file)
@@ -102,7 +102,7 @@ private:
 };
 
 IntervalTimerImpl::IntervalTimerImpl(IOService& io_service) :
-    interval_(0), timer_(io_service.get_io_service()),
+    interval_(0), timer_(io_service.getIOService()),
     mode_(IntervalTimer::REPEATING) {
 }
 
index eab0d8302211245092356c94e8bd6d5923f35497..c7b53b2ed9de538ec713838126759bc8b4b18caa 100644 (file)
@@ -39,7 +39,7 @@ public:
     /// @param io_service Reference to the IO service.
     explicit IOAcceptor(IOService& io_service)
         : IOSocket(),
-          acceptor_(new typename ProtocolType::acceptor(io_service.get_io_service())) {
+          acceptor_(new typename ProtocolType::acceptor(io_service.getIOService())) {
     }
 
     /// @brief Destructor.
index 03cc2e238164086727346c4f4eb1d4c1beadfeea..f0d4662eb1b2c03442f06adb92537c6e36c7ea07 100644 (file)
@@ -45,7 +45,7 @@ public:
     /// This method return control to the caller as soon as the
     /// first handler has completed.  (If no handlers are ready when
     /// it is run, it will block until one is.)
-    void run_one() {
+    void runOne() {
         io_service_.run_one();
     };
 
@@ -88,7 +88,7 @@ public:
     /// that share the same \c io_service with the authoritative server.
     /// It will eventually be removed once the wrapper interface is
     /// generalized.
-    boost::asio::io_service& get_io_service() {
+    boost::asio::io_service& getIOService() {
         return (io_service_);
     }
 
@@ -116,8 +116,8 @@ IOService::run() {
 }
 
 void
-IOService::run_one() {
-    io_impl_->run_one();
+IOService::runOne() {
+    io_impl_->runOne();
 }
 
 void
@@ -146,8 +146,8 @@ IOService::stopWork() {
 }
 
 boost::asio::io_service&
-IOService::get_io_service() {
-    return (io_impl_->get_io_service());
+IOService::getIOService() {
+    return (io_impl_->getIOService());
 }
 
 void
index 4bcedf1cb762061ce4bb10b6f3f28838924ffc0f..ca0b343778d30b8da7f16086aa00f57935859f49 100644 (file)
@@ -58,7 +58,7 @@ public:
     /// This method return control to the caller as soon as the
     /// first handler has completed.  (If no handlers are ready when
     /// it is run, it will block until one is.)
-    void run_one();
+    void runOne();
 
     /// \brief Run the underlying event loop for a ready events.
     ///
@@ -89,7 +89,7 @@ public:
     /// that share the same \c io_service with the authoritative server.
     /// It will eventually be removed once the wrapper interface is
     /// generalized.
-    boost::asio::io_service& get_io_service();
+    boost::asio::io_service& getIOService();
 
     /// \brief Post a callback to the end of the queue.
     ///
index 26529f0f185d6ae1b0ce44048baed80213de3a06..b844902f4e9fe8caf0b141721db9542eb75b7f5c 100644 (file)
@@ -68,7 +68,7 @@ private:
 IOSignalSetImpl::IOSignalSetImpl(IOServicePtr io_service,
                                  IOSignalHandler handler)
     : io_service_(io_service),
-      signal_set_(io_service_->get_io_service()),
+      signal_set_(io_service_->getIOService()),
       handler_(handler) {
 }
 
index e5a5a21915035fb8125e33e9181af6e3d4a2917a..69f3da2b533557145bd8361b8c310d1ed59acb0e 100644 (file)
@@ -118,7 +118,7 @@ typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> TlsStreamImpl;
 template <typename Callback, typename TlsStreamImpl>
 TlsStreamBase<Callback, TlsStreamImpl>::
 TlsStreamBase(IOService& service, TlsContextPtr context)
-    : TlsStreamImpl(service.get_io_service(), context->getContext()),
+    : TlsStreamImpl(service.getIOService(), context->getContext()),
       role_(context->getRole()) {
 }
 
index c8ea4544a8c771b37a468c4b577740f15982d58e..8c8515be64d826986f1ce247f849f516fcab1403 100644 (file)
@@ -262,7 +262,7 @@ TCPSocket<C>::TCPSocket(boost::asio::ip::tcp::socket& socket) :
 
 template <typename C>
 TCPSocket<C>::TCPSocket(IOService& service) :
-    socket_ptr_(new boost::asio::ip::tcp::socket(service.get_io_service())),
+    socket_ptr_(new boost::asio::ip::tcp::socket(service.getIOService())),
     socket_(*socket_ptr_)
 {
 }
index 757bba4d4297df0ee8e4e35e45099333c9319ece..d4d13ee893a123caf47682d0e20ab0db64213810 100644 (file)
@@ -314,8 +314,7 @@ TEST_F(IntervalTimerTest, intervalModeTest) {
     // we've hit our goals.  It won't return zero unless is out of
     // work or the service has been stopped by the test timer.
     int cnt = 0;
-    while (((cnt = io_service_.get_io_service().run_one()) > 0)
-           && (repeater_count < 5)) {
+    while (((cnt = io_service_.getIOService().run_one()) > 0) && (repeater_count < 5)) {
         // deliberately empty
     };
 
@@ -342,7 +341,7 @@ TEST_F(IntervalTimerTest, timerReuseTest) {
 
     // Run until a single event handler executes.  This should be our
     // one-shot expiring.
-    io_service_.run_one();
+    io_service_.runOne();
 
     // Verify the timer expired once.
     ASSERT_EQ(one_shot_count, 1);
@@ -352,7 +351,7 @@ TEST_F(IntervalTimerTest, timerReuseTest) {
 
     // Run until a single event handler executes.  This should be our
     // one-shot expiring.
-    io_service_.run_one();
+    io_service_.runOne();
 
     // Verify the timer expired once.
     ASSERT_EQ(one_shot_count, 2);
@@ -364,8 +363,7 @@ TEST_F(IntervalTimerTest, timerReuseTest) {
     // we've hit our goals.  It won't return zero unless is out of
     // work or the service has been stopped by the test timer.
     int cnt = 0;
-    while ((cnt = io_service_.get_io_service().run_one())
-            && (one_shot_count < 4)) {
+    while ((cnt = io_service_.getIOService().run_one()) && (one_shot_count < 4)) {
         // deliberately empty
     };
 
index 69d0c09713b7b66603f90d66d465438644e7f822..26e3dc8cdd4801f1c166b91dc0f20a9e9b8f71c8 100644 (file)
@@ -122,10 +122,10 @@ TEST_F(IOSignalTest, singleSignalTest) {
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -147,10 +147,10 @@ TEST_F(IOSignalTest, singleSignalTest) {
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
index 05fc5ac479ce2b03381655a02a88ed833a70fb0e..7a96702e83b48b970b1dc4509a6b8ffa6d51588a 100644 (file)
@@ -32,8 +32,8 @@ TEST(IOService, post) {
     // They have not yet been called
     EXPECT_TRUE(called.empty());
     // Process two events
-    service.run_one();
-    service.run_one();
+    service.runOne();
+    service.runOne();
     // Both events were called in the right order
     ASSERT_EQ(2, called.size());
     EXPECT_EQ(1, called[0]);
index 0fda5a1cf88ec028ea1a1e2f33178a0848b732a4..196b53223e676dea587000f10deb26e4fde0505c 100644 (file)
@@ -116,11 +116,11 @@ TEST_F(ProcessSpawnTest, spawnWithArgs) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -149,11 +149,11 @@ TEST_F(ProcessSpawnTest, spawnWithArgsAndEnvVars) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -180,11 +180,11 @@ TEST_F(ProcessSpawnTest, spawnTwoProcesses) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -196,11 +196,11 @@ TEST_F(ProcessSpawnTest, spawnTwoProcesses) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -233,11 +233,11 @@ TEST_F(ProcessSpawnTest, spawnNoArgs) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -253,11 +253,11 @@ TEST_F(ProcessSpawnTest, spawnNoArgs) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
@@ -334,11 +334,11 @@ TEST_F(ProcessSpawnTest, isRunning) {
     setTestTime(1000);
 
     // The next handler executed is IOSignal's handler.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // The first handler executed is the IOSignal's internal timer expire
     // callback.
-    io_service_->run_one();
+    io_service_->runOne();
 
     // Polling once to be sure.
     io_service_->poll();
index 5a925cca4ed8cea1df51d9392ca15cf7dce0106d..57fd4467c2da57335fd86b3292cdb20b99697457 100644 (file)
@@ -65,7 +65,7 @@ public:
     ///
     /// @param io_service IO service to be stopped on error.
     explicit TCPClient(IOService& io_service)
-        : io_service_(io_service.get_io_service()), socket_(io_service_) {
+        : io_service_(io_service.getIOService()), socket_(io_service_) {
     }
 
     /// @brief Destructor.
index 7531af6a8ab5fde97dd3b1c8fcefb89a925a859c..f78ac5f02651bc2fd1ee03a031489bcdd0728834 100644 (file)
@@ -324,7 +324,7 @@ TEST(TCPSocket, sequenceTest) {
     TCPEndpoint server_endpoint(server_address, SERVER_PORT);
                                             // Endpoint describing server
     TCPEndpoint server_remote_endpoint;     // Address where server received message from
-    tcp::socket server_socket(service.get_io_service());
+    tcp::socket server_socket(service.getIOService());
                                             // Socket used for server
 
     // Step 1.  Create the connection between the client and the server.  Set
@@ -335,7 +335,7 @@ TEST(TCPSocket, sequenceTest) {
     server_cb.queued() = TCPCallback::ACCEPT;
     server_cb.called() = TCPCallback::NONE;
     server_cb.setCode(42);  // Some error
-    tcp::acceptor acceptor(service.get_io_service(),
+    tcp::acceptor acceptor(service.getIOService(),
                             tcp::endpoint(tcp::v4(), SERVER_PORT));
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     acceptor.async_accept(server_socket, server_cb);
@@ -348,8 +348,8 @@ TEST(TCPSocket, sequenceTest) {
     client.open(&server_endpoint, client_cb);
 
     // Run the open and the accept callback and check that they ran.
-    service.run_one();
-    service.run_one();
+    service.runOne();
+    service.runOne();
 
     EXPECT_EQ(TCPCallback::ACCEPT, server_cb.called());
     EXPECT_EQ(0, server_cb.getCode());
@@ -377,7 +377,7 @@ TEST(TCPSocket, sequenceTest) {
 
     // Wait for the client callback to complete. (Must do this first on
     // Solaris: if we do the synchronous read first, the test hangs.)
-    service.run_one();
+    service.runOne();
 
     // Synchronously read the data from the server.;
     serverRead(server_socket, server_cb);
@@ -442,7 +442,7 @@ TEST(TCPSocket, sequenceTest) {
     bool server_complete = false;
     bool client_complete = false;
     while (!server_complete || !client_complete) {
-        service.run_one();
+        service.runOne();
 
         // Has the server run?
         if (!server_complete) {
index d9d9ccdd90118fe42a4ca56ac127e76adefa877f..b2716a829a368d8a0ed1344aaf92b8f14a3c5b4b 100644 (file)
@@ -66,7 +66,7 @@ public:
     ///
     /// @param io_service IO service to be stopped on error.
     explicit TLSClient(IOService& io_service)
-        : io_service_(io_service.get_io_service()), socket_(io_service_) {
+        : io_service_(io_service.getIOService()), socket_(io_service_) {
     }
 
     /// @brief Destructor.
index c2572c02d02fd2bdb097172a63ed532451e3f6dd..2804be3a736dcc3718135c6b2716448acc7737dc 100644 (file)
@@ -344,7 +344,7 @@ TEST(TLSSocket, sequenceTest) {
     TlsContextPtr server_ctx;
     test::configServer(server_ctx);
     // Stream used for server.
-    TlsStreamImpl server(service.get_io_service(), server_ctx->getContext());
+    TlsStreamImpl server(service.getIOService(), server_ctx->getContext());
 
     // Step 1.  Create the connection between the client and the server.  Set
     // up the server to accept incoming connections and have the client open
@@ -354,7 +354,7 @@ TEST(TLSSocket, sequenceTest) {
     server_cb.queued() = TLSCallback::ACCEPT;
     server_cb.called() = TLSCallback::NONE;
     server_cb.setCode(42);  // Some error
-    tcp::acceptor acceptor(service.get_io_service(),
+    tcp::acceptor acceptor(service.getIOService(),
                            tcp::endpoint(tcp::v4(), SERVER_PORT));
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     acceptor.async_accept(server.lowest_layer(), server_cb);
@@ -369,7 +369,7 @@ TEST(TLSSocket, sequenceTest) {
     // Run the open and the accept callback and check that they ran.
     while ((server_cb.called() == TLSCallback::NONE) ||
            (client_cb.called() == TLSCallback::NONE)) {
-        service.run_one();
+        service.runOne();
     }
     EXPECT_EQ(TLSCallback::ACCEPT, server_cb.called());
     EXPECT_EQ(0, server_cb.getCode());
@@ -398,7 +398,7 @@ TEST(TLSSocket, sequenceTest) {
 
     while ((server_cb.called() == TLSCallback::NONE) ||
            (client_cb.called() == TLSCallback::NONE)) {
-        service.run_one();
+        service.runOne();
     }
     EXPECT_EQ(TLSCallback::HANDSHAKE, client_cb.called());
     EXPECT_EQ(0, client_cb.getCode());
@@ -419,7 +419,7 @@ TEST(TLSSocket, sequenceTest) {
     // Wait for the client callback to complete. (Must do this first on
     // Solaris: if we do the synchronous read first, the test hangs.)
     while (client_cb.called() == TLSCallback::NONE) {
-        service.run_one();
+        service.runOne();
     }
 
     // Synchronously read the data from the server.;
@@ -486,7 +486,7 @@ TEST(TLSSocket, sequenceTest) {
     bool server_complete = false;
     bool client_complete = false;
     while (!server_complete || !client_complete) {
-        service.run_one();
+        service.runOne();
 
         // Has the server run?
         if (!server_complete) {
index cd7ca04f9f2d64bf2f1c4a05b53109099f2b7b5b..5f10e64e5aad344dbf78ef21e2a521bb43a00b88 100644 (file)
@@ -747,7 +747,7 @@ TEST(TLSTest, noHandshake) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -764,7 +764,7 @@ TEST(TLSTest, noHandshake) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -789,7 +789,7 @@ TEST(TLSTest, noHandshake) {
     TestCallback send_cb;
     async_write(client, boost::asio::buffer(send_buf), send_cb);
     while (!timeout && !send_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer1.cancel();
 
@@ -816,7 +816,7 @@ TEST(TLSTest, noHandshake) {
     TestCallback receive_cb;
     server.async_read_some(boost::asio::buffer(receive_buf), receive_cb);
     while (!timeout && !receive_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
@@ -854,7 +854,7 @@ TEST(TLSTest, serverNotConfigured) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -871,7 +871,7 @@ TEST(TLSTest, serverNotConfigured) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -897,7 +897,7 @@ TEST(TLSTest, serverNotConfigured) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -953,7 +953,7 @@ TEST(TLSTest, clientNotConfigured) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -970,7 +970,7 @@ TEST(TLSTest, clientNotConfigured) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -996,7 +996,7 @@ TEST(TLSTest, clientNotConfigured) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1052,13 +1052,13 @@ TEST(TLSTest, clientHTTPnoS) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
 
     // Client part.
-    tcp::socket client(service.get_io_service());
+    tcp::socket client(service.getIOService());
 
     // Connect to.
     client.open(tcp::v4());
@@ -1067,7 +1067,7 @@ TEST(TLSTest, clientHTTPnoS) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1097,7 +1097,7 @@ TEST(TLSTest, clientHTTPnoS) {
     client.async_send(boost::asio::buffer(send_buf), client_cb);
 
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1147,13 +1147,13 @@ TEST(TLSTest, unknownClient) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
 
     // Client part.
-    tcp::socket client(service.get_io_service());
+    tcp::socket client(service.getIOService());
 
     // Connect to.
     client.open(tcp::v4());
@@ -1162,7 +1162,7 @@ TEST(TLSTest, unknownClient) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1192,7 +1192,7 @@ TEST(TLSTest, unknownClient) {
     client.async_send(boost::asio::buffer(send_buf), client_cb);
 
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1237,7 +1237,7 @@ TEST(TLSTest, anotherClient) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1254,7 +1254,7 @@ TEST(TLSTest, anotherClient) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1280,7 +1280,7 @@ TEST(TLSTest, anotherClient) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1338,7 +1338,7 @@ TEST(TLSTest, selfSigned) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1355,7 +1355,7 @@ TEST(TLSTest, selfSigned) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1381,7 +1381,7 @@ TEST(TLSTest, selfSigned) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1447,7 +1447,7 @@ TEST(TLSTest, noHandshakeCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1464,7 +1464,7 @@ TEST(TLSTest, noHandshakeCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1489,7 +1489,7 @@ TEST(TLSTest, noHandshakeCloseonError) {
     TestCallback send_cb(&client.lowest_layer());
     async_write(client, boost::asio::buffer(send_buf), send_cb);
     while (!timeout && !send_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer1.cancel();
 
@@ -1516,7 +1516,7 @@ TEST(TLSTest, noHandshakeCloseonError) {
     TestCallback receive_cb;
     server.async_read_some(boost::asio::buffer(receive_buf), receive_cb);
     while (!timeout && !receive_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
@@ -1550,7 +1550,7 @@ TEST(TLSTest, serverNotConfiguredCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1567,7 +1567,7 @@ TEST(TLSTest, serverNotConfiguredCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1593,7 +1593,7 @@ TEST(TLSTest, serverNotConfiguredCloseonError) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1648,7 +1648,7 @@ TEST(TLSTest, clientNotConfiguredCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1665,7 +1665,7 @@ TEST(TLSTest, clientNotConfiguredCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1691,7 +1691,7 @@ TEST(TLSTest, clientNotConfiguredCloseonError) {
     TestCallback client_cb(&client.lowest_layer());
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1746,13 +1746,13 @@ TEST(TLSTest, clientHTTPnoSCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
 
     // Client part.
-    tcp::socket client(service.get_io_service());
+    tcp::socket client(service.getIOService());
 
     // Connect to.
     client.open(tcp::v4());
@@ -1761,7 +1761,7 @@ TEST(TLSTest, clientHTTPnoSCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1791,7 +1791,7 @@ TEST(TLSTest, clientHTTPnoSCloseonError) {
     client.async_send(boost::asio::buffer(send_buf), client_cb);
 
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1841,7 +1841,7 @@ TEST(TLSTest, anotherClientCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1858,7 +1858,7 @@ TEST(TLSTest, anotherClientCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1884,7 +1884,7 @@ TEST(TLSTest, anotherClientCloseonError) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -1940,7 +1940,7 @@ TEST(TLSTest, selfSignedCloseonError) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -1957,7 +1957,7 @@ TEST(TLSTest, selfSignedCloseonError) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -1983,7 +1983,7 @@ TEST(TLSTest, selfSignedCloseonError) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2046,7 +2046,7 @@ TEST(TLSTest, anotherClientNoReq) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2063,7 +2063,7 @@ TEST(TLSTest, anotherClientNoReq) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2089,7 +2089,7 @@ TEST(TLSTest, anotherClientNoReq) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2118,7 +2118,7 @@ TEST(TLSTest, serverRaw) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2135,7 +2135,7 @@ TEST(TLSTest, serverRaw) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2161,7 +2161,7 @@ TEST(TLSTest, serverRaw) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2191,7 +2191,7 @@ TEST(TLSTest, trustedSelfSigned) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2208,7 +2208,7 @@ TEST(TLSTest, trustedSelfSigned) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2234,7 +2234,7 @@ TEST(TLSTest, trustedSelfSigned) {
     TestCallback client_cb;
     client.async_handshake(roleToImpl(TlsRole::CLIENT), client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2269,7 +2269,7 @@ TEST(TLSTest, shutdownInactive) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2286,7 +2286,7 @@ TEST(TLSTest, shutdownInactive) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2312,7 +2312,7 @@ TEST(TLSTest, shutdownInactive) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2332,7 +2332,7 @@ TEST(TLSTest, shutdownInactive) {
     TestCallback shutdown_cb;
     client.shutdown(shutdown_cb);
     while (!timeout && !shutdown_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
@@ -2367,7 +2367,7 @@ TEST(TLSTest, shutdownActive) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2384,7 +2384,7 @@ TEST(TLSTest, shutdownActive) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2410,7 +2410,7 @@ TEST(TLSTest, shutdownActive) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2435,7 +2435,7 @@ TEST(TLSTest, shutdownActive) {
     TestCallback shutdown_cb;
     client.shutdown(shutdown_cb);
     while (!timeout && (!shutdown_cb.getCalled() || !receive_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
@@ -2479,7 +2479,7 @@ TEST(TLSTest, shutdownCloseInactive) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2496,7 +2496,7 @@ TEST(TLSTest, shutdownCloseInactive) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2522,7 +2522,7 @@ TEST(TLSTest, shutdownCloseInactive) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2545,7 +2545,7 @@ TEST(TLSTest, shutdownCloseInactive) {
     // Post a close which should be called after the shutdown.
     service.post([&client] { client.lowest_layer().close(); });
     while (!timeout && !shutdown_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
@@ -2583,7 +2583,7 @@ TEST(TLSTest, shutdownCloseActive) {
     // Accept a client.
     tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
                                           SERVER_PORT));
-    tcp::acceptor acceptor(service.get_io_service(), server_ep);
+    tcp::acceptor acceptor(service.getIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
     TestCallback accept_cb;
     acceptor.async_accept(server.lowest_layer(), accept_cb);
@@ -2600,7 +2600,7 @@ TEST(TLSTest, shutdownCloseActive) {
 
     // Run accept and connect.
     while (!accept_cb.getCalled() || !connect_cb.getCalled()) {
-        service.run_one();
+        service.runOne();
     }
 
     // Verify the error codes.
@@ -2626,7 +2626,7 @@ TEST(TLSTest, shutdownCloseActive) {
     TestCallback client_cb;
     client.handshake(client_cb);
     while (!timeout && (!server_cb.getCalled() || !client_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer.cancel();
 
@@ -2654,7 +2654,7 @@ TEST(TLSTest, shutdownCloseActive) {
     // Post a close which should be called after the shutdown.
     service.post([&client] { client.lowest_layer().close(); });
     while (!timeout && (!shutdown_cb.getCalled() || !receive_cb.getCalled())) {
-        service.run_one();
+        service.runOne();
     }
     timer2.cancel();
 
index 1fb96160ab5a04e085781cdb0156aff8c26c1197..da09ca203d9969cd90d37dc6d549e6557a7f9104 100644 (file)
@@ -230,7 +230,7 @@ TEST(UDPSocket, SequenceTest) {
     // The server - with which the client communicates.  For convenience, we
     // use the same io_service, and use the endpoint object created for
     // the client to send to as the endpoint object in the constructor.
-    boost::asio::ip::udp::socket server(service.get_io_service(),
+    boost::asio::ip::udp::socket server(service.getIOService(),
         server_endpoint.getASIOEndpoint());
     server.set_option(socket_base::reuse_address(true));
 
@@ -257,8 +257,8 @@ TEST(UDPSocket, SequenceTest) {
     EXPECT_FALSE(client_cb.getCalled());
 
     // Execute the two callbacks.
-    service.run_one();
-    service.run_one();
+    service.runOne();
+    service.runOne();
 
     EXPECT_TRUE(client_cb.getCalled());
     EXPECT_EQ(0, client_cb.getCode());
@@ -286,8 +286,8 @@ TEST(UDPSocket, SequenceTest) {
         server_remote_endpoint.getASIOEndpoint(), server_cb);
 
     // Expect two callbacks to run.
-    service.run_one();
-    service.run_one();
+    service.runOne();
+    service.runOne();
 
     EXPECT_TRUE(client_cb.getCalled());
     EXPECT_EQ(0, client_cb.getCode());
index 31c573dd534906a9eaa067047b72f6df30888959..033c80375a85f78e5241d1ff11760ff8ec2df9a7 100644 (file)
@@ -138,7 +138,7 @@ TEST_F(UnixDomainSocketTest, sendReceive) {
     // Run IO service to generate server's response.
     while ((test_socket_->getResponseNum() < 1) &&
            (!test_socket_->isStopped())) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // Receive response from the socket.
@@ -179,7 +179,7 @@ TEST_F(UnixDomainSocketTest, asyncSendReceive) {
     ));
     // Run IO service until connect handler is invoked.
     while (!connect_handler_invoked && (!test_socket_->isStopped())) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // We are going to asynchronously send the 'foo' over the unix socket.
@@ -202,7 +202,7 @@ TEST_F(UnixDomainSocketTest, asyncSendReceive) {
     // Run IO service to generate server's response.
     while ((test_socket_->getResponseNum() < 1) &&
            (!test_socket_->isStopped())) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // There is no guarantee that all data have been sent so we only check that
@@ -215,7 +215,7 @@ TEST_F(UnixDomainSocketTest, asyncSendReceive) {
     // Run IO service until we get the full response from the server.
     while ((response_.size() < expected_response.size()) &&
            !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // Check that the entire response has been received and is correct.
@@ -259,7 +259,7 @@ TEST_F(UnixDomainSocketTest, asyncClientErrors) {
         EXPECT_TRUE(ec);
     });
     while (!connect_handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // Send
@@ -272,7 +272,7 @@ TEST_F(UnixDomainSocketTest, asyncClientErrors) {
         EXPECT_TRUE(ec);
     });
     while (!send_handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 
     // Receive
@@ -285,7 +285,7 @@ TEST_F(UnixDomainSocketTest, asyncClientErrors) {
         EXPECT_TRUE(ec);
     });
     while (!receive_handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 }
 
index 7f7007d01822edc3fcabc318fdebb4e1ef2e1365..fb282adc09aaa1f8583f37e18cbcb389027e5499 100644 (file)
@@ -160,7 +160,7 @@ public:
     /// @return Pointer to the socket.
     UnixSocketPtr getSocket() {
         if (!next_socket_) {
-            next_socket_.reset(new UnixSocket(io_service_.get_io_service()));
+            next_socket_.reset(new UnixSocket(io_service_.getIOService()));
         }
         return (next_socket_);
     }
@@ -228,7 +228,7 @@ TestServerUnixSocket::TestServerUnixSocket(IOService& io_service,
                                            const std::string& custom_response)
     : io_service_(io_service),
       server_endpoint_(socket_file_path),
-      server_acceptor_(io_service_.get_io_service()),
+      server_acceptor_(io_service_.getIOService()),
       test_timer_(io_service_),
       custom_response_(custom_response),
       connection_pool_(new ConnectionPool(io_service)),
index c272ee7ce492329bdececa9f3e888f56db6fc630..cf156738c22ada8e59ab0898c5759f7b71448645 100644 (file)
@@ -37,7 +37,7 @@ class ConnectionPool;
 /// It is possible to make multiple connections to the server side
 /// socket simultaneously.
 ///
-/// The test should perform IOService::run_one until it finds that
+/// The test should perform IOService::runOne until it finds that
 /// the number of responses sent by the server is greater than
 /// expected. The number of responses sent so far can be retrieved
 /// using @ref TestServerUnixSocket::getResponseNum.
index fea8defd75477d4234732fc3bd24358e64f16b1d..75013e34f1b111525d572416e8caa0d3dc090c20 100644 (file)
@@ -173,7 +173,7 @@ UDPSocket<C>::UDPSocket(boost::asio::ip::udp::socket& socket) :
 
 template <typename C>
 UDPSocket<C>::UDPSocket(IOService& service) :
-    socket_ptr_(new boost::asio::ip::udp::socket(service.get_io_service())),
+    socket_ptr_(new boost::asio::ip::udp::socket(service.getIOService())),
     socket_(*socket_ptr_), isopen_(false)
 {
 }
index ca9e15ce30a695c539a858388405f6e3b5701367..81c83955f656e364b308b92ca6d1977dcd5a949c 100644 (file)
@@ -26,7 +26,7 @@ public:
     ///
     /// @param io_service IO service to be used by the socket class.
     UnixDomainSocketImpl(IOService& io_service)
-        : socket_(io_service.get_io_service()) {
+        : socket_(io_service.getIOService()) {
     }
 
     /// @brief Destructor.
index 6321f34774bf71ab35f65e88953b97e3f5f967aa..b88854bcd875419ec23fead8c0adcc1d5fb15c7b 100644 (file)
@@ -63,7 +63,7 @@ class ClientConnectionImpl;
 ///            }
 /// );
 /// while (!cb_invoked) {
-///     io_service.run_one();
+///     io_service.runOne();
 /// }
 /// @endcode
 ///
index 3ecca820719ee1743ba5b90002a71633a27761e0..9e57575fb68553978f90288f5e7dbd2970d2aaa6 100644 (file)
@@ -116,7 +116,7 @@ TEST_F(ClientConnectionTest, success) {
     });
     // Run the connection.
     while (!handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 }
 
@@ -153,7 +153,7 @@ TEST_F(ClientConnectionTest, timeout) {
     }, ClientConnection::Timeout(1000));
 
     while (!handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 }
 
@@ -176,7 +176,7 @@ TEST_F(ClientConnectionTest, connectionError) {
     });
 
     while (!handler_invoked && !test_socket_->isStopped()) {
-        io_service_.run_one();
+        io_service_.runOne();
     }
 }
 
index 34115fa07261a8b2577db6cde78b9bea0154d2ae..98517b7f9db6bf39d77eec946a98ce2aebf29cf7 100644 (file)
@@ -392,7 +392,7 @@ public:
         // responses. The reuse address option is set so as both sockets can
         // use the same address. This new socket is bound to the test address
         // and port, where requests will be sent.
-        socket_.reset(new udp::socket(service_.get_io_service(),
+        socket_.reset(new udp::socket(service_.getIOService(),
                                       boost::asio::ip::udp::v4()));
         socket_->set_option(socket_base::reuse_address(true));
         socket_->bind(udp::endpoint(address::from_string(TEST_ADDRESS),
@@ -443,8 +443,8 @@ public:
 
         // Since the callback, operator(), calls stop() on the io_service,
         // we must reset it in order for subsequent calls to run() or
-        // run_one() to work.
-        service_.get_io_service().reset();
+        // runOne() to work.
+        service_.getIOService().reset();
     }
 
     /// @brief Performs a single request-response exchange with or without TSIG.
@@ -465,7 +465,7 @@ public:
         ASSERT_NO_THROW(message.setZone(Name("example.com"), RRClass::IN()));
 
         // Setup our "loopback" server.
-        udp::socket udp_socket(service_.get_io_service(), boost::asio::ip::udp::v4());
+        udp::socket udp_socket(service_.getIOService(), boost::asio::ip::udp::v4());
         udp_socket.set_option(socket_base::reuse_address(true));
         udp_socket.bind(udp::endpoint(address::from_string(TEST_ADDRESS),
                                       TEST_PORT));
@@ -495,8 +495,8 @@ public:
 
         // Since the callback, operator(), calls stop() on the io_service,
         // we must reset it in order for subsequent calls to run() or
-        // run_one() to work.
-        service_.get_io_service().reset();
+        // runOne() to work.
+        service_.getIOService().reset();
     }
 };
 
index dd7ffe2f050bef9b9834c53403c56e5fac4ef38f..819a7d80b9042f5063b67729b4957734ee9bc8da 100644 (file)
@@ -62,7 +62,7 @@ FauxServer::FauxServer(asiolink::IOService& io_service,
      server_socket_(), receive_pending_(false), perpetual_receive_(true),
      tsig_key_() {
 
-    server_socket_.reset(new boost::asio::ip::udp::socket(io_service_.get_io_service(),
+    server_socket_.reset(new boost::asio::ip::udp::socket(io_service_.getIOService(),
                                                    boost::asio::ip::udp::v4()));
     server_socket_->set_option(boost::asio::socket_base::reuse_address(true));
 
@@ -75,7 +75,7 @@ FauxServer::FauxServer(asiolink::IOService& io_service,
     :io_service_(io_service), address_(server.getIpAddress()),
      port_(server.getPort()), server_socket_(), receive_pending_(false),
      perpetual_receive_(true), tsig_key_() {
-    server_socket_.reset(new boost::asio::ip::udp::socket(io_service_.get_io_service(),
+    server_socket_.reset(new boost::asio::ip::udp::socket(io_service_.getIOService(),
                                                    boost::asio::ip::udp::v4()));
     server_socket_->set_option(boost::asio::socket_base::reuse_address(true));
     isc::asiolink::UDPEndpoint endpoint(address_, port_);
@@ -225,10 +225,10 @@ TimedIO::~TimedIO() {
 int
 TimedIO::runTimedIO(int run_time) {
     run_time_ = run_time;
-    int cnt = io_service_->get_io_service().poll();
+    int cnt = io_service_->getIOService().poll();
     if (cnt == 0) {
         timer_.setup(std::bind(&TimedIO::timesUp, this), run_time_);
-        cnt = io_service_->get_io_service().run_one();
+        cnt = io_service_->getIOService().run_one();
         timer_.cancel();
     }
 
index aa3563779075ace582a65b74490994c68b0a8e85..dac4abe84405152ddbef6c8167fb482923e09cb5 100644 (file)
@@ -161,10 +161,10 @@ public:
     ///
     /// This method first polls IOService to run any ready handlers.  If no
     /// handlers are ready, it starts the internal time to run for the given
-    /// amount of time and invokes service's run_one method.  This method
+    /// amount of time and invokes service's runOne method.  This method
     /// blocks until at least one handler executes or the IO Service is stopped.
     /// Upon completion of this method the timer is cancelled.  Should the
-    /// timer expires prior to run_one returning, the timesUp handler will be
+    /// timer expires prior to runOne returning, the timesUp handler will be
     /// invoked which stops the IO service and fails the test.
     ///
     /// Note that this method closely mimics the runIO method in D2Process.
index 220fb3b2243a440125e36b55a0547e8dbc035996..6966b9e1009aa702a03ce149358ddf6be54b8116 100644 (file)
@@ -492,7 +492,7 @@ NameChangeSender::runReadyIO() {
     // By running poll we're guaranteed not to hang.
     /// @todo Trac# 3325 requests that asiolink::IOService provide a
     /// wrapper for poll().
-    io_service_->get_io_service().poll_one();
+    io_service_->getIOService().poll_one();
 }
 
 }  // namespace dhcp_ddns
index ae377934b6b4c4fa5989dc5e150d98a555130cea..59a57d0d0da3c4b00d7786dc5447969bad0d0083 100644 (file)
@@ -93,7 +93,7 @@ NameChangeUDPListener::open(isc::asiolink::IOService& io_service) {
     // Create the low level socket.
     try {
         asio_socket_.reset(new boost::asio::ip::udp::
-                           socket(io_service.get_io_service(),
+                           socket(io_service.getIOService(),
                                   (ip_address_.isV4() ? boost::asio::ip::udp::v4() :
                                    boost::asio::ip::udp::v6())));
 
@@ -233,7 +233,7 @@ NameChangeUDPSender::open(isc::asiolink::IOService& io_service) {
     // Create the low level socket.
     try {
         asio_socket_.reset(new boost::asio::ip::udp::
-                           socket(io_service.get_io_service(),
+                           socket(io_service.getIOService(),
                                   (ip_address_.isV4() ? boost::asio::ip::udp::v4() :
                                    boost::asio::ip::udp::v6())));
 
index f0efa29a59f5e9a2f1ce403d98341a706c128dcf..2e46dac70d12fda7b749240823ecb82972870ec2 100644 (file)
@@ -134,7 +134,7 @@ TEST(NameChangeUDPListenerBasicTest, basicListenTests) {
     EXPECT_TRUE(listener->isIoPending());
 
     // Verify that IO pending is false, after cancel event occurs.
-    EXPECT_NO_THROW(io_service.run_one());
+    EXPECT_NO_THROW(io_service.runOne());
     EXPECT_FALSE(listener->isIoPending());
 
     // Verify that attempting to stop listening when we are not is ok.
@@ -197,7 +197,7 @@ public:
 
         // Create a UDP socket through which our "sender" will send the NCR.
         boost::asio::ip::udp::socket
-            udp_socket(io_service_.get_io_service(), boost::asio::ip::udp::v4());
+            udp_socket(io_service_.getIOService(), boost::asio::ip::udp::v4());
 
         // Create an endpoint pointed at the listener.
         boost::asio::ip::udp::endpoint
@@ -252,7 +252,7 @@ TEST_F(NameChangeUDPListenerTest, basicReceiveTests) {
         ASSERT_NO_THROW(sendNcr(valid_msgs[i]));
 
         // Execute no more then one event, which should be receive complete.
-        EXPECT_NO_THROW(io_service_.run_one());
+        EXPECT_NO_THROW(io_service_.runOne());
 
         // Verify the "application" status value for a successful complete.
         EXPECT_EQ(NameChangeListener::SUCCESS, result_);
@@ -268,7 +268,7 @@ TEST_F(NameChangeUDPListenerTest, basicReceiveTests) {
     EXPECT_FALSE(listener_->amListening());
 
     // Verify that IO pending is false, after cancel event occurs.
-    EXPECT_NO_THROW(io_service_.run_one());
+    EXPECT_NO_THROW(io_service_.runOne());
     EXPECT_FALSE(listener_->isIoPending());
 }
 
@@ -446,7 +446,7 @@ TEST_F(NameChangeUDPSenderBasicTest, basicSendTests) {
 
     // Loop for the number of valid messages. So long as there is at least
     // on NCR in the queue, select-fd indicate ready to read. Invoke
-    // IOService::run_one. This should complete the send of exactly one
+    // IOService::runOne. This should complete the send of exactly one
     // message and the queue count should decrement accordingly.
     for (int i = num_msgs; i > 0; i--) {
         // Make sure select_fd does evaluates to ready via select and
@@ -574,7 +574,7 @@ TEST_F(NameChangeUDPSenderBasicTest, basicSendTestsMultiThreading) {
 
     // Loop for the number of valid messages. So long as there is at least
     // on NCR in the queue, select-fd indicate ready to read. Invoke
-    // IOService::run_one. This should complete the send of exactly one
+    // IOService::runOne. This should complete the send of exactly one
     // message and the queue count should decrement accordingly.
     for (int i = num_msgs; i > 0; i--) {
         // Make sure select_fd does evaluates to ready via select and
@@ -1098,7 +1098,7 @@ TEST_F(NameChangeUDPTest, roundTripTest) {
 
     // Execute callbacks until we have sent and received all of messages.
     while (sender_->getQueueSize() > 0 || (received_ncrs_.size() < num_msgs)) {
-        EXPECT_NO_THROW(io_service_.run_one());
+        EXPECT_NO_THROW(io_service_.runOne());
     }
 
     // Send queue should be empty.
@@ -1116,7 +1116,7 @@ TEST_F(NameChangeUDPTest, roundTripTest) {
     EXPECT_FALSE(listener_->amListening());
 
     // Verify that IO pending is false, after cancel event occurs.
-    EXPECT_NO_THROW(io_service_.run_one());
+    EXPECT_NO_THROW(io_service_.runOne());
     EXPECT_FALSE(listener_->isIoPending());
 
     // Verify that we can gracefully stop sending.
@@ -1152,7 +1152,7 @@ TEST_F(NameChangeUDPTest, roundTripTestMultiThreading) {
 
     // Execute callbacks until we have sent and received all of messages.
     while (sender_->getQueueSize() > 0 || (received_ncrs_.size() < num_msgs)) {
-        EXPECT_NO_THROW(io_service_.run_one());
+        EXPECT_NO_THROW(io_service_.runOne());
     }
 
     // Send queue should be empty.
@@ -1171,7 +1171,7 @@ TEST_F(NameChangeUDPTest, roundTripTestMultiThreading) {
     EXPECT_FALSE(listener_->amListening());
 
     // Verify that IO pending is false, after cancel event occurs.
-    EXPECT_NO_THROW(io_service_.run_one());
+    EXPECT_NO_THROW(io_service_.runOne());
     EXPECT_FALSE(listener_->isIoPending());
 
     // Verify that we can gracefully stop sending.
index b7e74d8c528d4972b6dfd58e40cfe181b18b9fb5..39c795b4f31bd41c052e5230842f507bd816f197 100644 (file)
@@ -328,7 +328,7 @@ public:
         }, timeout_ms, IntervalTimer::ONE_SHOT);
 
         io_service_->run();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
     }
 
     /// @brief Setup timers according to the configuration and run them
index 2941d82dadffea2381778d75c528953486a426ac..139538d3970bba4d768138bde328ebfd6bcf9f24 100644 (file)
@@ -122,7 +122,7 @@ CfgIfaceTest::doWait(const long timeout) {
         io_service_->stop();
     }, timeout, asiolink::IntervalTimer::ONE_SHOT);
     io_service_->run();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
 }
 
 // This test checks that the interface names can be explicitly selected
index 24981ea102815218ca19ae1aed7889ad98488b5a..6e8612518c2382073b391549d35036e7aeec6467 100644 (file)
@@ -248,7 +248,7 @@ public:
         }, ms, IntervalTimer::ONE_SHOT);
 
         io_service_->run();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
     }
 
     /// @brief Waits for the specified process to finish.
@@ -275,7 +275,7 @@ public:
         }, 1, IntervalTimer::REPEATING);
 
         io_service_->run();
-        io_service_->get_io_service().reset();
+        io_service_->getIOService().reset();
         return (!elapsed);
     }
 
index 4f7b58d266995d90714a1275fc8381396ce962df..9ec62104dc6c7a520eae15b5815bbd78c94fece6 100644 (file)
@@ -170,7 +170,7 @@ TimerMgrTest::doWait(const long timeout, const bool /*call_receive*/) {
         io_service_->stop();
     }, timeout, IntervalTimer::ONE_SHOT);
     io_service_->run();
-    io_service_->get_io_service().reset();
+    io_service_->getIOService().reset();
 }
 
 void
index 2ab76f351864aa116848e7f6fb79311c28019f09..b8f9ac5cb91bf3fa20d0622720fbdc8ee1eb22fc 100644 (file)
@@ -444,7 +444,7 @@ public:
     /// @param timeout Optional value specifying for how long the io service
     /// should be ran.
     void runIOService(long timeout = 0) {
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
 
         if (timeout > 0) {
             run_io_service_timer_.setup(std::bind(&HttpListenerTest::timeoutHandler,
@@ -452,7 +452,7 @@ public:
                                         timeout, IntervalTimer::ONE_SHOT);
         }
         io_service_.run();
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
         io_service_.poll();
     }
 
@@ -939,7 +939,7 @@ TEST_F(HttpListenerTest, invalidIdleTimeout) {
 // This test verifies that listener can't be bound to the port to which
 // other server is bound.
 TEST_F(HttpListenerTest, addressInUse) {
-    tcp::acceptor acceptor(io_service_.get_io_service());
+    tcp::acceptor acceptor(io_service_.getIOService());
     // Use other port than SERVER_PORT to make sure that this TCP connection
     // doesn't affect subsequent tests.
     tcp::endpoint endpoint(address::from_string(SERVER_ADDRESS),
index f95b11189cf762c1fe82cc6e4413ebdc60439a07..50078bdd8000eb8091f7cbfd02d34c51487d37e8 100644 (file)
@@ -34,7 +34,7 @@ public:
     explicit TestHttpClient(IOService& io_service,
                             const std::string& server_address = "127.0.0.1",
                             uint16_t port = 18123)
-        : io_service_(io_service.get_io_service()), socket_(io_service_),
+        : io_service_(io_service.getIOService()), socket_(io_service_),
           buf_(), response_(), server_address_(server_address),
           server_port_(port), receive_done_(false) {
     }
index fc999f5a783eb056f60f82c76a4df4534d048dbd..45b348abf2525ba049876783dcbc203af4d5d7ac 100644 (file)
@@ -250,7 +250,7 @@ public:
     /// @param timeout Optional value specifying for how long the io service
     /// should be ran (ms).
     void runIOService(long timeout = 0) {
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
 
         if (timeout > 0) {
             run_io_service_timer_.setup(std::bind(&HttpListenerTest::timeoutHandler,
@@ -258,7 +258,7 @@ public:
                                         timeout, IntervalTimer::ONE_SHOT);
         }
         io_service_.run();
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
         io_service_.poll();
     }
 
index a2a6f9d2a06145445ba04eff91dd7c4a54bc36af..0d5a940e0240d2f38c987377eb0dc03997701060 100644 (file)
@@ -407,7 +407,7 @@ public:
     /// @param io_service IO service to be stopped on error.
     /// @param tls_context TLS context.
     TestHttpClient(IOService& io_service, TlsContextPtr tls_context)
-        : io_service_(io_service.get_io_service()),
+        : io_service_(io_service.getIOService()),
           stream_(io_service_, tls_context->getContext()),
           buf_(), response_() {
     }
@@ -693,7 +693,7 @@ public:
     /// @param timeout Optional value specifying for how long the io service
     /// should be ran.
     void runIOService(long timeout = 0) {
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
 
         if (timeout > 0) {
             run_io_service_timer_.setup(std::bind(&HttpsListenerTest::timeoutHandler,
@@ -701,7 +701,7 @@ public:
                                         timeout, IntervalTimer::ONE_SHOT);
         }
         io_service_.run();
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
         io_service_.poll();
     }
 
@@ -1194,7 +1194,7 @@ TEST_F(HttpsListenerTest, invalidIdleTimeout) {
 // This test verifies that listener can't be bound to the port to which
 // other server is bound.
 TEST_F(HttpsListenerTest, addressInUse) {
-    tcp::acceptor acceptor(io_service_.get_io_service());
+    tcp::acceptor acceptor(io_service_.getIOService());
     // Use other port than SERVER_PORT to make sure that this TCP connection
     // doesn't affect subsequent tests.
     tcp::endpoint endpoint(address::from_string(SERVER_ADDRESS),
index e2b93096951c169d14ac7026bc7a33462bdbd70b..24eaff04692ea16842a78a42fe83b95ba96b32f3 100644 (file)
@@ -171,7 +171,7 @@ public:
     /// @brief Fetches the controller's IOService.
     ///
     /// @return a reference to the controller's IOService.
-    asiolink::IOServicePtr& getIoService() {
+    asiolink::IOServicePtr& getIOService() {
         return (io_service_);
     }
 
index 65008554d5a9a84209b939f5656d885ccfb55704..ec9eb3b1b8b109538720bd6b56c0e84cb8b78562 100644 (file)
@@ -41,10 +41,10 @@ DStubProcess::run() {
     // To use run(), the "managing" layer must issue an io_service::stop
     // or the call to run will continue to block, and shutdown will not
     // occur.
-    asiolink::IOServicePtr& io_service = getIoService();
+    asiolink::IOServicePtr& io_service = getIOService();
     while (!shouldShutdown()) {
         try {
-            io_service->run_one();
+            io_service->runOne();
         } catch (const std::exception& ex) {
             isc_throw (DProcessBaseError,
                 std::string("Process run method failed: ") + ex.what());
index 90be50a73e60dd10556ee364def2f0f6ee1e2f19..0cb6e65c53f2a14950cabee4dc32d0ccd2841d83 100644 (file)
@@ -150,7 +150,7 @@ public:
     /// @param timeout Optional value specifying for how long the io service
     /// should be ran.
     void runIOService(long timeout = 0) {
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
 
         if (timeout > 0) {
             run_io_service_timer_.setup(std::bind(&TcpListenerTest::timeoutHandler,
@@ -159,7 +159,7 @@ public:
                                         IntervalTimer::ONE_SHOT);
         }
         io_service_.run();
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
         io_service_.poll();
     }
 
index 2e1b30bbd4b147ccc6e6108527c853248a4bb4aa..5d14c65bfdd780990cc9e382efc3419563069d4a 100644 (file)
@@ -83,7 +83,7 @@ public:
                                 isc::asiolink::TlsContextPtr(),
                            const std::string& server_address = "127.0.0.1",
                            uint16_t port = 18123)
-        : io_service_(io_service.get_io_service()),
+        : io_service_(io_service.getIOService()),
           tls_context_(tls_context),
           tcp_socket_(), tls_socket_(),
           done_callback_(done_callback),
index f6286802b3cb67eb3df1b37bc5c7f28745722d93..8fdc416099e92f3807a1f8690fffa94231753f07 100644 (file)
@@ -160,7 +160,7 @@ public:
     /// @param timeout Optional value specifying for how long the io service
     /// should be ran.
     void runIOService(long timeout = 0) {
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
 
         if (timeout > 0) {
             run_io_service_timer_.setup(std::bind(&TlsListenerTest::timeoutHandler,
@@ -169,7 +169,7 @@ public:
                                         IntervalTimer::ONE_SHOT);
         }
         io_service_.run();
-        io_service_.get_io_service().reset();
+        io_service_.getIOService().reset();
         io_service_.poll();
     }