diff --git a/include/fc/json_rpc_connection.hpp b/include/fc/json_rpc_connection.hpp index f2f3198..5901413 100644 --- a/include/fc/json_rpc_connection.hpp +++ b/include/fc/json_rpc_connection.hpp @@ -67,6 +67,15 @@ namespace fc { namespace json { } std::function func; }; + template + struct rpc_server_method_impl : public rpc_server_method { + rpc_server_method_impl( const std::function& f ):func(f){} + virtual value call( const value& v ) { + fc::call_fused(func, named_param::type>::cast(v) ); + return value(); + } + std::function func; + }; template struct add_method_visitor {