Commit Graph

6 Commits

Author SHA1 Message Date
Gleb Natapov
5558abe9ec rpc: drop unused template parameter 2015-03-31 16:45:20 +03:00
Gleb Natapov
937970ccd3 rpc: keep shared pointer to a client connection
Client connection may outlive its do_until() loop. Make connection
point shared to overcome this. If connection dies while async handler
is running it will not be deleted until the handler is executed.
2015-03-25 11:32:33 +02:00
Gleb Natapov
9f0900ee0f rpc: add logger and log exception in no_wait callback 2015-03-22 16:16:23 +02:00
Gleb Natapov
12885b924c rpc: add a possibly to pass client_info to an rpc handler
If rpc handler needs locally held information about rpc client that
making a call it may have client_info as a first parameter of rpc
handler. Rpc framework will pass it to the callback during invocation.
2015-03-22 16:16:17 +02:00
Gleb Natapov
7fe06f006e rpc: introduce rpc::no_wait
If registered callback returns rpc::no_wait a client will not wait
for remote function execution and will get immediately ready future.
2015-03-22 16:16:09 +02:00
Gleb Natapov
36b76af7cc Implementation of rpc
To register rpc handler func(param1, param2, param3) both server and client

auto remote_func = myrpc.register_handler(id, func);

This call will return another function that client can use to invoke RPC
calls like this:

remote_func(client, param1, param2, param3);

This call will return future<> with func() result.
2015-03-12 15:38:18 +02:00