Files
genode-world/src/test/grpc/server/main.cc
Pirmin Duss e0f557c050 protobuf_grpc: google serializing and RPC library
protobuf : 3.9.3
grpc     : 1.24.0

This a new version of the port with a vastly reduced port size.

Issue #190
2019-11-26 14:11:04 +01:00

51 lines
754 B
C++

#include <base/attached_rom_dataspace.h>
#include <libc/component.h>
#include <base/heap.h>
#include <base/log.h>
#include <base/thread.h>
#include "greeter_server.h"
enum { STACK_SIZE = 0xF000 };
namespace Grpc_server {
using namespace Genode;
class Runner;
class Server_main;
}
class Grpc_server::Runner : public Thread
{
public:
Runner(Env& env)
: Thread(env, "runner", STACK_SIZE)
{
}
void entry() override
{
Libc::with_libc([] () {
RunServer();
});
}
};
class Grpc_server::Server_main
{
private:
Env& _env;
Runner _runner { _env };
public:
Server_main(Env& env)
: _env(env)
{
_runner.start();
}
};
void Libc::Component::construct(Libc::Env &env)
{
static Grpc_server::Server_main main(env);
}