From 3fb985750474908f801308f55349e7c0278e32c8 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Fri, 23 Nov 2012 17:35:07 -0500 Subject: [PATCH] handle void methods --- include/fc/json_rpc_connection.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 {