Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 665 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 665 Bytes

frpcaclient

FastRPC async client.

TODO

Deps

libcurl, libfastrpc

Desired usage:

#include <frpcaclient.h>

int main() {
    FRPC::Pool_t pool;

    frpc::aclient::ServerProxy proxy;
    frpc::aclient::Request req("http://host:port/RPC2");
    // prepare call someRemoteMethod(1)
    req.prepare("someRemoteMethod", pool.Int(1));

    proxy.add(req);
    // prepare and add more requests... and then launch it.
    proxy.wait();

    if (req.success()) {
        // process result ... FRPC::Struct(req.getResponse(pool));
    } else {
        // fail message: ... std::cerr << req.getError();
        return 1;
    }
    return 0;
}