MCPcopy Create free account
hub / github.com/boostorg/json / do_rpc

Function do_rpc

test/doc_storage_ptr.cpp:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74// tag::doc_storage_ptr_5[]
75template< class Handler >
76void do_rpc( string_view s, Handler&& h )
77{
78 unsigned char buffer[ 8192 ]; // Small stack buffer to avoid most allocations during parse
79 monotonic_resource mr( buffer ); // This resource will use our local buffer first
80 value const jv = parse( s, &mr ); // Parse the input string into a value that uses our resource
81 h( jv ); // Call the handler to perform the RPC command
82}
83// end::doc_storage_ptr_5[]
84
85//----------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected