diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 10:51:20 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 10:51:20 +0000 |
commit | 76ed35ea52b5ab35ab91a59aeefb7a154052060f (patch) | |
tree | f8126013346e77197593bc1d74af9ccb7751b6bf /fnet | |
parent | 26c16eeb3d4d792938ab9af9aff1e01b540a6f42 (diff) |
Misc cleanup of includes and code health
Diffstat (limited to 'fnet')
33 files changed, 125 insertions, 155 deletions
diff --git a/fnet/src/examples/frt/rpc/echo_client.cpp b/fnet/src/examples/frt/rpc/echo_client.cpp index 06f4ef0ee5b..bb2ef66c6fa 100644 --- a/fnet/src/examples/frt/rpc/echo_client.cpp +++ b/fnet/src/examples/frt/rpc/echo_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp index 726a500cc55..c63352d8f24 100644 --- a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp +++ b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp index 872894b190d..9832a59abad 100644 --- a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp +++ b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp @@ -1,6 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/transport.h> + #include <vespa/fastos/app.h> #include <thread> diff --git a/fnet/src/examples/frt/rpc/rpc_client.cpp b/fnet/src/examples/frt/rpc/rpc_client.cpp index fc1d54d3440..1c634f4b704 100644 --- a/fnet/src/examples/frt/rpc/rpc_client.cpp +++ b/fnet/src/examples/frt/rpc/rpc_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_info.cpp b/fnet/src/examples/frt/rpc/rpc_info.cpp index d90d22d1986..0f8b8422241 100644 --- a/fnet/src/examples/frt/rpc/rpc_info.cpp +++ b/fnet/src/examples/frt/rpc/rpc_info.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_invoke.cpp b/fnet/src/examples/frt/rpc/rpc_invoke.cpp index fb82622a537..d1f35429352 100644 --- a/fnet/src/examples/frt/rpc/rpc_invoke.cpp +++ b/fnet/src/examples/frt/rpc/rpc_invoke.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/vespalib/locale/c.h> diff --git a/fnet/src/examples/frt/rpc/rpc_proxy.cpp b/fnet/src/examples/frt/rpc/rpc_proxy.cpp index a61e2d37197..93076344ce2 100644 --- a/fnet/src/examples/frt/rpc/rpc_proxy.cpp +++ b/fnet/src/examples/frt/rpc/rpc_proxy.cpp @@ -1,6 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/invoker.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> + #include <vespa/fastos/app.h> #include <chrono> @@ -15,12 +23,10 @@ struct Session uint32_t id; uint32_t finiCnt; - Session(uint32_t xid) : client(nullptr), server(nullptr), id(xid), finiCnt(0) {} + explicit Session(uint32_t xid) : client(nullptr), server(nullptr), id(xid), finiCnt(0) {} ~Session() { assert(client == nullptr && server == nullptr && finiCnt == 2); } - -private: - Session(const Session &); - Session &operator=(const Session &); + Session(const Session &) = delete; + Session &operator=(const Session &) = delete; }; //----------------------------------------------------------------------------- @@ -34,10 +40,9 @@ private: uint32_t _currID; char _prefixStr[256]; - RPCProxy(const RPCProxy &); - RPCProxy &operator=(const RPCProxy &); - public: + RPCProxy(const RPCProxy &) = delete; + RPCProxy &operator=(const RPCProxy &) = delete; RPCProxy(FRT_Supervisor &supervisor, const char *spec, bool verbose) @@ -69,7 +74,7 @@ private: RPCProxy &_proxy; public: - ReqDone(RPCProxy &proxy) : _proxy(proxy) {} + explicit ReqDone(RPCProxy &proxy) : _proxy(proxy) {} void RequestDone(FRT_RPCRequest *req) override; }; diff --git a/fnet/src/examples/frt/rpc/rpc_server.cpp b/fnet/src/examples/frt/rpc/rpc_server.cpp index aa521080538..4333f182cc0 100644 --- a/fnet/src/examples/frt/rpc/rpc_server.cpp +++ b/fnet/src/examples/frt/rpc/rpc_server.cpp @@ -1,6 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/transport.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/ping/packets.cpp b/fnet/src/examples/ping/packets.cpp index e5e9f645c9a..6aa54838c8b 100644 --- a/fnet/src/examples/ping/packets.cpp +++ b/fnet/src/examples/ping/packets.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> #include "packets.h" +#include <vespa/fnet/databuffer.h> uint32_t PingRequest::GetPCODE() diff --git a/fnet/src/examples/ping/pingclient.cpp b/fnet/src/examples/ping/pingclient.cpp index 1d65ef3b69c..6a7bd21e715 100644 --- a/fnet/src/examples/ping/pingclient.cpp +++ b/fnet/src/examples/ping/pingclient.cpp @@ -1,8 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/connection.h> #include <examples/ping/packets.h> #include <vespa/fastos/app.h> +#include <vespa/fastos/thread.h> #include <vespa/log/log.h> LOG_SETUP("pingclient"); diff --git a/fnet/src/examples/ping/pingserver.cpp b/fnet/src/examples/ping/pingserver.cpp index c4543134912..cb0ab02aa0d 100644 --- a/fnet/src/examples/ping/pingserver.cpp +++ b/fnet/src/examples/ping/pingserver.cpp @@ -1,6 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/connector.h> #include <examples/ping/packets.h> #include <vespa/fastos/app.h> diff --git a/fnet/src/examples/proxy/proxy.cpp b/fnet/src/examples/proxy/proxy.cpp index a01a16ead9c..062a0d52627 100644 --- a/fnet/src/examples/proxy/proxy.cpp +++ b/fnet/src/examples/proxy/proxy.cpp @@ -1,6 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/connection.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/packet.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/ipacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/connector.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> @@ -140,7 +148,7 @@ private: public: Proxy() : _transport() {} - ~Proxy() { } + ~Proxy() override { } bool GetPacketInfo(FNET_DataBuffer *src, uint32_t *plen, uint32_t *pcode, uint32_t *chid, bool *) override; FNET_Packet *Decode(FNET_DataBuffer *src, uint32_t plen, uint32_t pcode, FNET_Context) override; void Encode(FNET_Packet *packet, uint32_t chid, FNET_DataBuffer *dst) override; diff --git a/fnet/src/examples/timeout/timeout.cpp b/fnet/src/examples/timeout/timeout.cpp index 23dfbeb9070..9f363ccd864 100644 --- a/fnet/src/examples/timeout/timeout.cpp +++ b/fnet/src/examples/timeout/timeout.cpp @@ -1,7 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/packetqueue.h> +#include <vespa/fnet/controlpacket.h> #include <vespa/fastos/app.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/time.h> #include <thread> diff --git a/fnet/src/tests/connect/connect_test.cpp b/fnet/src/tests/connect/connect_test.cpp index 3fe7b5b7614..4d92a4d66fc 100644 --- a/fnet/src/tests/connect/connect_test.cpp +++ b/fnet/src/tests/connect/connect_test.cpp @@ -1,7 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/ipackethandler.h> +#include <vespa/fnet/connection.h> +#include <vespa/fnet/controlpacket.h> #include <vespa/vespalib/net/server_socket.h> #include <vespa/vespalib/net/crypto_engine.h> #include <vespa/vespalib/util/stringfmt.h> @@ -114,7 +119,7 @@ struct TransportFixture : FNET_IPacketHandler, FNET_IConnectionCleanupHandler { conn->SetCleanupHandler(this); return conn; } - ~TransportFixture() { + ~TransportFixture() override { transport.ShutDown(true); pool.Close(); } diff --git a/fnet/src/tests/connection_spread/connection_spread_test.cpp b/fnet/src/tests/connection_spread/connection_spread_test.cpp index 11120ebc3dc..caeb4211ab2 100644 --- a/fnet/src/tests/connection_spread/connection_spread_test.cpp +++ b/fnet/src/tests/connection_spread/connection_spread_test.cpp @@ -1,6 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/ipacketstreamer.h> +#include <vespa/fnet/connector.h> +#include <vespa/fnet/connection.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/stringfmt.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/frt/method_pt/method_pt.cpp b/fnet/src/tests/frt/method_pt/method_pt.cpp index 53960d73466..450731fe1aa 100644 --- a/fnet/src/tests/frt/method_pt/method_pt.cpp +++ b/fnet/src/tests/frt/method_pt/method_pt.cpp @@ -1,8 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/vespalib/util/stringfmt.h> -#include <vespa/fnet/frt/frt.h> - +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> class Test; class SimpleHandler; diff --git a/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp b/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp index ed4911175a0..ff85b389780 100644 --- a/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp +++ b/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp @@ -1,7 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/vespalib/util/stringfmt.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/transport.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <vespa/vespalib/net/crypto_engine.h> #include <vespa/vespalib/net/tls/tls_crypto_engine.h> @@ -26,7 +29,7 @@ struct Rpc : FRT_Invokable { FRT_Target *connect(uint32_t port) { return orb.GetTarget(port); } - ~Rpc() { + ~Rpc() override { transport.ShutDown(true); thread_pool.Close(); } @@ -34,7 +37,7 @@ struct Rpc : FRT_Invokable { struct Server : Rpc { uint32_t port; - Server(CryptoEngine::SP crypto, size_t num_threads) : Rpc(crypto, num_threads), port(listen()) { + Server(CryptoEngine::SP crypto, size_t num_threads) : Rpc(std::move(crypto), num_threads), port(listen()) { init_rpc(); start(); } @@ -54,7 +57,7 @@ struct Server : Rpc { struct Client : Rpc { uint32_t port; - Client(CryptoEngine::SP crypto, size_t num_threads, const Server &server) : Rpc(crypto, num_threads), port(server.port) { + Client(CryptoEngine::SP crypto, size_t num_threads, const Server &server) : Rpc(std::move(crypto), num_threads), port(server.port) { start(); } FRT_Target *connect() { return Rpc::connect(port); } @@ -62,7 +65,7 @@ struct Client : Rpc { struct Result { std::vector<double> req_per_sec; - Result(size_t num_threads) : req_per_sec(num_threads, 0.0) {} + explicit Result(size_t num_threads) : req_per_sec(num_threads, 0.0) {} double throughput() const { double sum = 0.0; for (double sample: req_per_sec) { diff --git a/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp b/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp index cdb2636a8c1..8a954db26e0 100644 --- a/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp +++ b/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp @@ -6,7 +6,9 @@ #include <vespa/vespalib/net/tls/tls_crypto_engine.h> #include <vespa/vespalib/test/make_tls_options_for_testing.h> #include <vespa/vespalib/test/time_tracer.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp index 95dbe672909..68bd58d2f82 100644 --- a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp +++ b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp @@ -1,6 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/invoker.h> #include <vespa/vespalib/util/stringfmt.h> struct Receptor : public FRT_IRequestWait diff --git a/fnet/src/tests/frt/rpc/invoke.cpp b/fnet/src/tests/frt/rpc/invoke.cpp index 410a60fa08a..bd2f6fa9e1d 100644 --- a/fnet/src/tests/frt/rpc/invoke.cpp +++ b/fnet/src/tests/frt/rpc/invoke.cpp @@ -3,7 +3,10 @@ #include <vespa/vespalib/net/socket_spec.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <vespa/vespalib/util/latch.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/invoker.h> #include <mutex> #include <condition_variable> @@ -25,7 +28,7 @@ private: vespalib::Latch<FRT_RPCRequest*> _latch; public: RequestLatch() : _latch() {} - ~RequestLatch() { ASSERT_TRUE(!has_req()); } + ~RequestLatch() override { ASSERT_TRUE(!has_req()); } bool has_req() { return _latch.has_value(); } FRT_RPCRequest *read() { return _latch.read(); } void write(FRT_RPCRequest *req) { _latch.write(req); } @@ -38,8 +41,8 @@ class MyReq { private: FRT_RPCRequest *_req; public: - MyReq(FRT_RPCRequest *req) : _req(req) {} - MyReq(const char *method_name) + explicit MyReq(FRT_RPCRequest *req) : _req(req) {} + explicit MyReq(const char *method_name) : _req(new FRT_RPCRequest()) { _req->SetMethodName(method_name); @@ -270,8 +273,6 @@ public: _testRPC(&_server.supervisor()), _echoTest(&_server.supervisor()) { - _client.supervisor().GetTransport()->SetTCPNoDelay(true); - _server.supervisor().GetTransport()->SetTCPNoDelay(true); ASSERT_TRUE(_server.supervisor().Listen("tcp/0")); _peerSpec = SocketSpec::from_host_port("localhost", _server.supervisor().GetListenPort()).spec(); _target = _client.supervisor().GetTarget(_peerSpec.c_str()); diff --git a/fnet/src/tests/frt/rpc/session.cpp b/fnet/src/tests/frt/rpc/session.cpp index 24cbedb3ff7..b96c881ba27 100644 --- a/fnet/src/tests/frt/rpc/session.cpp +++ b/fnet/src/tests/frt/rpc/session.cpp @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <mutex> //------------------------------------------------------------- diff --git a/fnet/src/tests/frt/rpc/sharedblob.cpp b/fnet/src/tests/frt/rpc/sharedblob.cpp index 1c0503454c7..09297bbf1c3 100644 --- a/fnet/src/tests/frt/rpc/sharedblob.cpp +++ b/fnet/src/tests/frt/rpc/sharedblob.cpp @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vector> constexpr size_t ALLOC_LIMIT=1024; diff --git a/fnet/src/tests/info/info.cpp b/fnet/src/tests/info/info.cpp index 1d26f2b0fa1..3422efe1da6 100644 --- a/fnet/src/tests/info/info.cpp +++ b/fnet/src/tests/info/info.cpp @@ -1,6 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/info.h> #include <mutex> #include <condition_variable> diff --git a/fnet/src/tests/locking/castspeed.cpp b/fnet/src/tests/locking/castspeed.cpp index dc82073ea57..2f784e625be 100644 --- a/fnet/src/tests/locking/castspeed.cpp +++ b/fnet/src/tests/locking/castspeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include <chrono> class B; diff --git a/fnet/src/tests/locking/drainpackets.cpp b/fnet/src/tests/locking/drainpackets.cpp index 9db43a5eb52..2d0ab6e2808 100644 --- a/fnet/src/tests/locking/drainpackets.cpp +++ b/fnet/src/tests/locking/drainpackets.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/packetqueue.h> +#include <vespa/fnet/packet.h> #include <mutex> #include <chrono> diff --git a/fnet/src/tests/locking/lockspeed.cpp b/fnet/src/tests/locking/lockspeed.cpp index ae6b983d724..a3ab48edd22 100644 --- a/fnet/src/tests/locking/lockspeed.cpp +++ b/fnet/src/tests/locking/lockspeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include "dummy.h" #include <chrono> diff --git a/fnet/src/tests/scheduling/schedule.cpp b/fnet/src/tests/scheduling/schedule.cpp index a1b02a688bf..fc5b5687c87 100644 --- a/fnet/src/tests/scheduling/schedule.cpp +++ b/fnet/src/tests/scheduling/schedule.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/scheduler.h> +#include <vespa/fnet/task.h> using my_clock = FNET_Scheduler::clock; using time_point = my_clock::time_point; diff --git a/fnet/src/tests/scheduling/sloweventloop.cpp b/fnet/src/tests/scheduling/sloweventloop.cpp index 5ddc9b1502c..a36afbc9d92 100644 --- a/fnet/src/tests/scheduling/sloweventloop.cpp +++ b/fnet/src/tests/scheduling/sloweventloop.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/scheduler.h> +#include <vespa/fnet/task.h> class MyTask : public FNET_Task { diff --git a/fnet/src/tests/thread_selection/thread_selection_test.cpp b/fnet/src/tests/thread_selection/thread_selection_test.cpp index ecfe0c57d5c..35df07221a2 100644 --- a/fnet/src/tests/thread_selection/thread_selection_test.cpp +++ b/fnet/src/tests/thread_selection/thread_selection_test.cpp @@ -1,6 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> #include <vespa/vespalib/util/stringfmt.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/time/timespeed.cpp b/fnet/src/tests/time/timespeed.cpp index e6d2af5a278..eda367f1990 100644 --- a/fnet/src/tests/time/timespeed.cpp +++ b/fnet/src/tests/time/timespeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <chrono> diff --git a/fnet/src/vespa/fnet/fnet.h b/fnet/src/vespa/fnet/fnet.h deleted file mode 100644 index c7570e025ec..00000000000 --- a/fnet/src/vespa/fnet/fnet.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include <vespa/vespalib/component/vtag.h> - -// DEPRECATED - -#define DEPRECATED __attribute__((deprecated)) - -// FORWARD DECLARATIONS - -class FNET_IPacketFactory; -class FNET_IPacketHandler; -class FNET_IPacketStreamer; -class FNET_IServerAdapter; -class FNET_IExecutable; - -class FNET_Channel; -class FNET_ChannelLookup; -class FNET_ChannelPool; -class FNET_Config; -class FNET_Connection; -class FNET_Connector; -class FNET_Context; -class FNET_ControlPacket; -class FNET_DataBuffer; -class FNET_DummyPacket; -class FNET_Info; -class FNET_IOComponent; -class FNET_Packet; -class FNET_PacketQueue; -class FNET_Scheduler; -class FNET_SimplePacketStreamer; -class FNET_Task; -class FNET_Transport; -class FNET_TransportThread; - -// CONTEXT CLASS (union of types) -#include "context.h" - -// INTERFACES -#include "ipacketfactory.h" -#include "ipackethandler.h" -#include "ipacketstreamer.h" -#include "iserveradapter.h" -#include "iexecutable.h" - -// CLASSES -#include "task.h" -#include "scheduler.h" -#include "config.h" -#include "databuffer.h" -#include "packet.h" -#include "dummypacket.h" -#include "controlpacket.h" -#include "packetqueue.h" -#include "channel.h" -#include "channellookup.h" -#include "simplepacketstreamer.h" -#include "transport_thread.h" -#include "iocomponent.h" -#include "transport.h" -#include "connection.h" -#include "connector.h" -#include "info.h" -#include "signalshutdown.h" - diff --git a/fnet/src/vespa/fnet/frt/frt.h b/fnet/src/vespa/fnet/frt/frt.h deleted file mode 100644 index 490b9b0a2b1..00000000000 --- a/fnet/src/vespa/fnet/frt/frt.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -class FRT_Invokable; -class FRT_IAbortHandler; -class FRT_IReturnHandler; -class FRT_ICleanupHandler; -class FRT_ISharedBlob; - -class FRT_Method; -class FRT_PacketFactory; -class FRT_ReflectionBuilder; -class FRT_ReflectionManager; -class FRT_RPCErrorPacket; -class FRT_RPCInvoker; -class FRT_RPCReplyPacket; -class FRT_RPCRequest; -class FRT_RPCRequestPacket; -class FRT_Supervisor; -class FRT_Target; -class FRT_Values; - -#include <vespa/fnet/fnet.h> -#include "error.h" -#include "isharedblob.h" -#include "invokable.h" -#include "values.h" -#include "reflection.h" -#include "rpcrequest.h" -#include "packets.h" -#include "invoker.h" -#include "supervisor.h" -#include "target.h" - diff --git a/fnet/src/vespa/fnet/transport.h b/fnet/src/vespa/fnet/transport.h index 1126f68e69f..4acac4d6c6e 100644 --- a/fnet/src/vespa/fnet/transport.h +++ b/fnet/src/vespa/fnet/transport.h @@ -3,6 +3,7 @@ #pragma once #include "context.h" +#include "config.h" #include <memory> #include <vector> #include <vespa/vespalib/net/async_resolver.h> |