> This is moving slowly. I now have RPC caller side support for std::string and
> std::vector<char>. RPC server side is next. K.O.
The RPC_CXX code is now merged into MIDAS branch feature/rpc_call_cxx.
This code fully supports passing std::string and std::vector<char> through the MIDAS RPC is both directions.
For data passed from client to mserver, memory for string and vector data is allocated automatically as needed.
For data returned from mserver to client, memory to hold returned string and vector data is allocated automatically as
need.
This means that RPC calls can return data of arbitrary size, the rpc caller does not need to know maximum data size.
Removing this limitation was the main motivation for this development.
I completed this code in June 2024, but could not merge it because I broke my git repository (oops). Now I am doing
the merge manually. Changes are isolated to rpc_call_encode(), rpc_call_decode() and rpc_execute(). My intent right
now is to use the new RPC code only for RPCs that pass std::string and std::vector<char>, existing RPCs will use the
old code without any changes. This seems to be the safest way to move forward.
Included is test_rpc() which tests and probes most normal uses cases and some corner cases. When writing the test
code, I found a few bugs in the old MIDAS RPC code. If I remember right, I committed fixes for those bugs to main
MIDAS right then and there.
K.O. |