]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/seastar/demos/tcp_sctp_client_demo.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / demos / tcp_sctp_client_demo.cc
index a07e55f58d2ba320c651c42601e13ba9cf307199..4b7960e4d10065330ec4bcdb04a306121707f15b 100644 (file)
@@ -23,6 +23,7 @@
 #include <seastar/core/app-template.hh>
 #include <seastar/core/future-util.hh>
 #include <seastar/core/distributed.hh>
+#include <seastar/core/print.hh>
 
 using namespace seastar;
 using namespace net;
@@ -136,7 +137,7 @@ public:
         auto started = lowres_clock::now();
         return conn->ping(_pings_per_connection).then([started] {
             auto finished = lowres_clock::now();
-            clients.invoke_on(0, &client::ping_report, started, finished);
+            (void)clients.invoke_on(0, &client::ping_report, started, finished);
         });
     }
 
@@ -144,7 +145,7 @@ public:
         auto started = lowres_clock::now();
         return conn->rxrx().then([started] (size_t bytes) {
             auto finished = lowres_clock::now();
-            clients.invoke_on(0, &client::rxtx_report, started, finished, bytes);
+            (void)clients.invoke_on(0, &client::rxtx_report, started, finished, bytes);
         });
     }
 
@@ -152,7 +153,7 @@ public:
         auto started = lowres_clock::now();
         return conn->txtx().then([started] (size_t bytes) {
             auto finished = lowres_clock::now();
-            clients.invoke_on(0, &client::rxtx_report, started, finished, bytes);
+            (void)clients.invoke_on(0, &client::rxtx_report, started, finished, bytes);
         });
     }
 
@@ -172,7 +173,7 @@ public:
             fprint(std::cout, "Total Time(Secs): %f\n", secs);
             fprint(std::cout, "Requests/Sec: %f\n",
                 static_cast<double>(_total_pings) / secs);
-            clients.stop().then([] {
+            (void)clients.stop().then([] {
                 engine().exit(0);
             });
         }
@@ -195,7 +196,7 @@ public:
             fprint(std::cout, "Total Time(Secs): %f\n", secs);
             fprint(std::cout, "Bandwidth(Gbits/Sec): %f\n",
                 static_cast<double>((_processed_bytes * 8)) / (1000 * 1000 * 1000) / secs);
-            clients.stop().then([] {
+            (void)clients.stop().then([] {
                 engine().exit(0);
             });
         }
@@ -209,9 +210,9 @@ public:
 
         for (unsigned i = 0; i < ncon; i++) {
             socket_address local = socket_address(::sockaddr_in{AF_INET, INADDR_ANY, {0}});
-            engine().net().connect(make_ipv4_address(server_addr), local, protocol).then([this, test] (connected_socket fd) {
+            (void)engine().net().connect(make_ipv4_address(server_addr), local, protocol).then([this, test] (connected_socket fd) {
                 auto conn = new connection(std::move(fd));
-                (this->*tests.at(test))(conn).then_wrapped([conn] (auto&& f) {
+                (void)(this->*tests.at(test))(conn).then_wrapped([conn] (auto&& f) {
                     delete conn;
                     try {
                         f.get();
@@ -263,8 +264,8 @@ int main(int ac, char ** av) {
             return engine().exit(1);
         }
 
-        clients.start().then([server, test, ncon] () {
-            clients.invoke_on_all(&client::start, ipv4_addr{server}, test, ncon);
+        (void)clients.start().then([server, test, ncon] () {
+            return clients.invoke_on_all(&client::start, ipv4_addr{server}, test, ncon);
         });
     });
 }