
OvermindDL1 wrote:
asio::io_service ios; client m_client( ios, "rpc://server/" );
remote_function< void( int ) > m_func = m_client( "some.resource" );
Yep, that is how mine worked, just based on a Boost.Function interface.
If you come up with some benchmarks I would like to compare it to what I made a couple of years ago (where I was admittedly not as experienced with such things as I am now), so if you could post the complete compilable example with included libraries, I am interested.
If your application is designed to be synchronous, you can never be faster than a full roundtrip. How would a asynchronous version look like? This would be the part I'm most interested in, the true asynchronous case. On invocation, you would do the send only, i.e., the function returns immediately (perhaps even before doing the send). You would issue a completion handler with your request. perhaps remote_function< void( int ) > m_func; could be called // synchronous case, throwing, blocking send/receive m_func( 2 ); // asynchronous case, nonthrowing, fully async, completion handler // result_type must be void m_func( 2, some_handler ) or, something along the line of future semantics? future<...> = m_func(2); Cheers, Rutger