aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server/async_server_context.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-02-02 10:16:30 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-02 15:39:31 -0800
commitc4f0ebe63bbd4b7f9ca551fd6dcb0df026464623 (patch)
tree09b0da67e8386833fecec4135c370708cb5bafec /src/cpp/server/async_server_context.cc
parentd2bfa1a288f3eeccbee3275787d95128f2871017 (diff)
Prepare for the new batch call API.
Rename all core API functions that are on their way to deprecation with an _old tag across all wrappings.
Diffstat (limited to 'src/cpp/server/async_server_context.cc')
-rw-r--r--src/cpp/server/async_server_context.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cpp/server/async_server_context.cc b/src/cpp/server/async_server_context.cc
index 92958111c0..2dd3cd1e8e 100644
--- a/src/cpp/server/async_server_context.cc
+++ b/src/cpp/server/async_server_context.cc
@@ -53,14 +53,15 @@ AsyncServerContext::AsyncServerContext(
AsyncServerContext::~AsyncServerContext() { grpc_call_destroy(call_); }
void AsyncServerContext::Accept(grpc_completion_queue *cq) {
- GPR_ASSERT(grpc_call_server_accept(call_, cq, this) == GRPC_CALL_OK);
- GPR_ASSERT(grpc_call_server_end_initial_metadata(call_, 0) == GRPC_CALL_OK);
+ GPR_ASSERT(grpc_call_server_accept_old(call_, cq, this) == GRPC_CALL_OK);
+ GPR_ASSERT(grpc_call_server_end_initial_metadata_old(call_, 0) ==
+ GRPC_CALL_OK);
}
bool AsyncServerContext::StartRead(google::protobuf::Message *request) {
GPR_ASSERT(request);
request_ = request;
- grpc_call_error err = grpc_call_start_read(call_, this);
+ grpc_call_error err = grpc_call_start_read_old(call_, this);
return err == GRPC_CALL_OK;
}
@@ -70,13 +71,13 @@ bool AsyncServerContext::StartWrite(const google::protobuf::Message &response,
if (!SerializeProto(response, &buffer)) {
return false;
}
- grpc_call_error err = grpc_call_start_write(call_, buffer, this, flags);
+ grpc_call_error err = grpc_call_start_write_old(call_, buffer, this, flags);
grpc_byte_buffer_destroy(buffer);
return err == GRPC_CALL_OK;
}
bool AsyncServerContext::StartWriteStatus(const Status &status) {
- grpc_call_error err = grpc_call_start_write_status(
+ grpc_call_error err = grpc_call_start_write_status_old(
call_, static_cast<grpc_status_code>(status.code()),
status.details().empty() ? nullptr
: const_cast<char *>(status.details().c_str()),