summaryrefslogtreecommitdiffstats
path: root/fnet/src/examples/frt/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'fnet/src/examples/frt/rpc')
-rw-r--r--fnet/src/examples/frt/rpc/echo_client.cpp7
-rw-r--r--fnet/src/examples/frt/rpc/rpc_callback_client.cpp8
-rw-r--r--fnet/src/examples/frt/rpc/rpc_callback_server.cpp8
-rw-r--r--fnet/src/examples/frt/rpc/rpc_client.cpp8
-rw-r--r--fnet/src/examples/frt/rpc/rpc_info.cpp7
-rw-r--r--fnet/src/examples/frt/rpc/rpc_invoke.cpp7
-rw-r--r--fnet/src/examples/frt/rpc/rpc_proxy.cpp10
-rw-r--r--fnet/src/examples/frt/rpc/rpc_server.cpp8
8 files changed, 38 insertions, 25 deletions
diff --git a/fnet/src/examples/frt/rpc/echo_client.cpp b/fnet/src/examples/frt/rpc/echo_client.cpp
index 9a5cf7cbd64..b5fabb32363 100644
--- a/fnet/src/examples/frt/rpc/echo_client.cpp
+++ b/fnet/src/examples/frt/rpc/echo_client.cpp
@@ -1,12 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("echo_client");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
class EchoClient : public FastOS_Application
{
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp
index 2bf740f7b1e..3dd936f7fea 100644
--- a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp
@@ -1,7 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_callback_client");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
+
struct RPC : public FRT_Invokable
{
@@ -32,7 +34,7 @@ RPC::Init(FRT_Supervisor *s)
class MyApp : public FastOS_Application
{
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp
index 67eac0743d6..419b1266d23 100644
--- a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp
@@ -1,7 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_callback_server");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
+
struct RPC : public FRT_Invokable
{
@@ -38,7 +40,7 @@ RPC::Init(FRT_Supervisor *s)
class MyApp : public FastOS_Application
{
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_client.cpp b/fnet/src/examples/frt/rpc/rpc_client.cpp
index 435bfb6f08c..f5e5a9fe1e2 100644
--- a/fnet/src/examples/frt/rpc/rpc_client.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_client.cpp
@@ -1,12 +1,14 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_client");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
+
class RPCClient : public FastOS_Application
{
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_info.cpp b/fnet/src/examples/frt/rpc/rpc_info.cpp
index ae9eafa210d..5b7aebd6bdd 100644
--- a/fnet/src/examples/frt/rpc/rpc_info.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_info.cpp
@@ -1,7 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_info");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
class RPCInfo : public FastOS_Application
{
@@ -63,7 +64,7 @@ public:
printf("\n");
}
- int Main() override;
+ virtual int Main() override;
};
diff --git a/fnet/src/examples/frt/rpc/rpc_invoke.cpp b/fnet/src/examples/frt/rpc/rpc_invoke.cpp
index 1bb572a6025..0f64ef9b539 100644
--- a/fnet/src/examples/frt/rpc/rpc_invoke.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_invoke.cpp
@@ -1,7 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_invoke");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
class RPCClient : public FastOS_Application
{
@@ -42,7 +43,7 @@ private:
int run();
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_proxy.cpp b/fnet/src/examples/frt/rpc/rpc_proxy.cpp
index e73f556b9d8..6c805d6a173 100644
--- a/fnet/src/examples/frt/rpc/rpc_proxy.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_proxy.cpp
@@ -1,7 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_proxy");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
+
//-----------------------------------------------------------------------------
struct Session
@@ -66,7 +68,7 @@ private:
public:
ReqDone(RPCProxy &proxy) : _proxy(proxy) {}
- void RequestDone(FRT_RPCRequest *req) override;
+ virtual void RequestDone(FRT_RPCRequest *req) override;
};
void
@@ -207,7 +209,7 @@ RPCProxy::HOOK_Fini(FRT_RPCRequest *req)
class App : public FastOS_Application
{
public:
- int Main() override;
+ virtual int Main() override;
};
int
diff --git a/fnet/src/examples/frt/rpc/rpc_server.cpp b/fnet/src/examples/frt/rpc/rpc_server.cpp
index 2b7e16b91b6..823d3c893b1 100644
--- a/fnet/src/examples/frt/rpc/rpc_server.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_server.cpp
@@ -1,7 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/fastos/fastos.h>
+#include <vespa/log/log.h>
+LOG_SETUP("rpc_server");
#include <vespa/fnet/frt/frt.h>
-#include <vespa/fastos/app.h>
+
class RPCServer : public FRT_Invokable
{
@@ -105,7 +107,7 @@ private:
public:
App() : _server() {}
- int Main() override;
+ virtual int Main() override;
};
int