From a847a8f8bc3f2fdc542d11671a4d34997f2b0538 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 Feb 2015 21:20:25 -0800 Subject: Finish streaming, lame client --- include/grpc++/stream.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/grpc++') 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; -- cgit v1.2.3