aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-11 21:20:25 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-11 21:20:25 -0800
commita847a8f8bc3f2fdc542d11671a4d34997f2b0538 (patch)
tree9c01dd8c195354d0bd0d6ce1e7bfe3fd5f744255 /include/grpc++
parent0d6b9b35ee8db0249d0c541a087a1ecdc0ab1f8d (diff)
Finish streaming, lame client
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/stream.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h
index 4a804c7c90..a59ccd8c05 100644
--- a/include/grpc++/stream.h
+++ b/include/grpc++/stream.h
@@ -91,6 +91,7 @@ class ClientReader final : public ClientStreamingInterface,
const google::protobuf::Message &request)
: context_(context), call_(channel->CreateCall(method, context, &cq_)) {
CallOpBuffer buf;
+ buf.AddSendInitialMetadata(&context->send_initial_metadata_);
buf.AddSendMessage(request);
buf.AddClientSendClose();
call_.PerformOps(&buf);
@@ -178,7 +179,12 @@ class ClientReaderWriter final : public ClientStreamingInterface,
// Blocking create a stream.
ClientReaderWriter(ChannelInterface *channel,
const RpcMethod &method, ClientContext *context)
- : context_(context), call_(channel->CreateCall(method, context, &cq_)) {}
+ : context_(context), call_(channel->CreateCall(method, context, &cq_)) {
+ CallOpBuffer buf;
+ buf.AddSendInitialMetadata(&context->send_initial_metadata_);
+ call_.PerformOps(&buf);
+ GPR_ASSERT(cq_.Pluck(&buf));
+ }
virtual bool Read(R *msg) override {
CallOpBuffer buf;