forstio/source/forstio/rpc/rpc.h

38 lines
823 B
C++

#pragma once
#include "schema.h"
namespace saw {
template<typename Codec, typename Schema> class rpc;
/**
* Provides the interface for messages with an rpc type behaviour
*/
template<typename Codec, typename... Responses, typename... Requests, StringLiteral... Literals>
class rpc<schema::Interface<schema::Function<Responses, Requests, Literals>...>> {
public:
class client {
public:
/**
*
*/
template<StringLiteral FunctionLiteral>
conveyor<Message<FunctionResponse>> request(message<FunctionRequest> parameters);
};
class service {
public:
/**
*
*/
template<StringLiteral FunctionLiteral>
conveyor<Message<FunctionResponse>> handle(message<FunctionRequest> request);
};
class server {
};
};
}