| 94 | } |
| 95 | |
| 96 | ssize_t ExampleClient::RPCWrite(photon::net::EndPoint ep, const std::string& fn, |
| 97 | struct iovec* iovec, int iovcnt) { |
| 98 | WriteBuffer::Request req; |
| 99 | req.fn.assign(fn); |
| 100 | req.buf.assign(iovec, iovcnt); |
| 101 | WriteBuffer::Response resp; |
| 102 | int ret = 0; |
| 103 | |
| 104 | auto stub = pool->get_stub(ep, false); |
| 105 | if (!stub) return -1; |
| 106 | DEFER(pool->put_stub(ep, ret < 0)); |
| 107 | |
| 108 | ret = stub->call<WriteBuffer>(req, resp); |
| 109 | if (ret < 0) return ret; |
| 110 | return resp.ret; |
| 111 | } |
| 112 | |
| 113 | void ExampleClient::RPCTestrun(photon::net::EndPoint ep) { |
| 114 | Testrun::Request req; |
no test coverage detected