diff options
Diffstat (limited to 'fnet/src/examples')
-rw-r--r-- | fnet/src/examples/frt/rpc/echo_client.cpp | 4 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_callback_client.cpp | 4 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_callback_server.cpp | 6 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_client.cpp | 4 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_info.cpp | 4 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_invoke.cpp | 4 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_proxy.cpp | 25 | ||||
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_server.cpp | 5 | ||||
-rw-r--r-- | fnet/src/examples/ping/packets.cpp | 2 | ||||
-rw-r--r-- | fnet/src/examples/ping/pingclient.cpp | 6 | ||||
-rw-r--r-- | fnet/src/examples/ping/pingserver.cpp | 7 | ||||
-rw-r--r-- | fnet/src/examples/proxy/proxy.cpp | 12 | ||||
-rw-r--r-- | fnet/src/examples/timeout/timeout.cpp | 6 |
13 files changed, 66 insertions, 23 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> |