MCPcopy Create free account
hub / github.com/Clarionos/clarion / handle_reply

Method handle_reply

libraries/fc/src/rpc/state.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void state::handle_reply( const response& response )
31{
32 auto await = _awaiting.find( response.id );
33 FC_ASSERT( await != _awaiting.end(), "Unknown Response ID: ${id}", ("id",response.id)("response",response) );
34 if( response.result )
35 await->second->set_value( *response.result );
36 else if( response.error )
37 {
38 await->second->set_exception( std::make_exception_ptr( FC_EXCEPTION( exception, "${error}", ("error",response.error->message)("data",response) ) ) );
39 }
40 else
41 await->second->set_value( fc::variant() );
42 _awaiting.erase(await);
43}
44
45request state::start_remote_call( const string& method_name, variants args )
46{

Callers 1

on_messageMethod · 0.45

Calls 4

eraseMethod · 0.80
variantClass · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected