コード例 #1
0
ファイル: service2_client.cpp プロジェクト: disigma/fbthrift
folly::Future<std::pair<int32_t, std::unique_ptr<apache::thrift::transport::THeader>>> service2AsyncClient::header_future_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const  ::test_cpp2::cpp_reflection::struct1& j, double k) {
  folly::Promise<std::pair<int32_t, std::unique_ptr<apache::thrift::transport::THeader>>> promise172;
  auto future173 = promise172.getFuture();
  auto callback174 = folly::make_unique<apache::thrift::HeaderFutureCallback<int32_t>>(std::move(promise172), recv_wrapped_methodD, channel_);
  methodD(rpcOptions, std::move(callback174), i, j, k);
  return future173;
}
コード例 #2
0
ファイル: service2_client.cpp プロジェクト: disigma/fbthrift
folly::Future<int32_t> service2AsyncClient::future_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const  ::test_cpp2::cpp_reflection::struct1& j, double k) {
  folly::Promise<int32_t> promise169;
  auto future170 = promise169.getFuture();
  auto callback171 = folly::make_unique<apache::thrift::FutureCallback<int32_t>>(std::move(promise169), recv_wrapped_methodD, channel_);
  methodD(rpcOptions, std::move(callback171), i, j, k);
  return future170;
}
コード例 #3
0
ファイル: service2_client.cpp プロジェクト: disigma/fbthrift
int32_t service2AsyncClient::sync_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const  ::test_cpp2::cpp_reflection::struct1& j, double k) {
  apache::thrift::ClientReceiveState _returnState;
  auto callback168 = folly::make_unique<apache::thrift::ClientSyncCallback>(&_returnState, getChannel()->getEventBase(), false);
  methodD(rpcOptions, std::move(callback168), i, j, k);
  getChannel()->getEventBase()->loopForever();
  SCOPE_EXIT {
    if (_returnState.header() && !_returnState.header()->getHeaders().empty()) {
      rpcOptions.setReadHeaders(_returnState.header()->releaseHeaders());
    }
  };
  if (!_returnState.buf()) {
    assert(_returnState.exception());
    std::rethrow_exception(_returnState.exception());
  }
  return recv_methodD(_returnState);
}
コード例 #4
0
ファイル: service2.cpp プロジェクト: Bklyn/fbthrift
folly::Future<int32_t> service2SvIf::future_methodD(int32_t i, std::unique_ptr< ::test_cpp2::cpp_reflection::struct1> j, double k) {
  return apache::thrift::detail::si::future([&] { return methodD(i, std::move(j), k); });
}
コード例 #5
0
ファイル: service2_client.cpp プロジェクト: disigma/fbthrift
void service2AsyncClient::methodD(std::function<void (::apache::thrift::ClientReceiveState&&)> callback, int32_t i, const  ::test_cpp2::cpp_reflection::struct1& j, double k) {
  methodD(folly::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)),i,j,k);
}
コード例 #6
0
ファイル: service2_client.cpp プロジェクト: disigma/fbthrift
void service2AsyncClient::methodD(std::unique_ptr<apache::thrift::RequestCallback> callback, int32_t i, const  ::test_cpp2::cpp_reflection::struct1& j, double k) {
  ::apache::thrift::RpcOptions rpcOptions;
  methodD(rpcOptions, std::move(callback), i, j, k);
}