Improve RPC performance for local sessions

Don't unnecessarily de-/serialize JSON data if local session is used.
This commit is contained in:
Mike Gelfand
2015-07-13 00:32:48 +00:00
parent 5296570476
commit 18ea8c429a
10 changed files with 197 additions and 187 deletions
+4 -6
View File
@@ -21,15 +21,13 @@ extern "C" {
**** RPC processing
***/
struct evbuffer;
typedef void (*tr_rpc_response_func)(tr_session * session,
tr_variant * response,
void * user_data);
typedef void (*tr_rpc_response_func)(tr_session * session,
struct evbuffer * response,
void * user_data);
/* http://www.json.org/ */
void tr_rpc_request_exec_json (tr_session * session,
const void * request_json,
int request_len,
const tr_variant * request,
tr_rpc_response_func callback,
void * callback_user_data);