|
|
|
@ -102,6 +102,11 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request, |
|
|
|
|
|
|
|
|
|
ClientContext context; |
|
|
|
|
InteropClientContextInspector inspector(context); |
|
|
|
|
// If the request doesn't already specify the response type, default to
|
|
|
|
|
// COMPRESSABLE.
|
|
|
|
|
if (!request->has_response_type()) { |
|
|
|
|
request->set_response_type(PayloadType::COMPRESSABLE); |
|
|
|
|
} |
|
|
|
|
request->set_response_size(kLargeResponseSize); |
|
|
|
|
grpc::string payload(kLargeRequestSize, '\0'); |
|
|
|
|
request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); |
|
|
|
@ -248,6 +253,7 @@ void InteropClient::DoLargeUnary() { |
|
|
|
|
gpr_log(GPR_INFO, "Sending a large unary rpc..."); |
|
|
|
|
SimpleRequest request; |
|
|
|
|
SimpleResponse response; |
|
|
|
|
request.set_response_type(PayloadType::COMPRESSABLE); |
|
|
|
|
PerformLargeUnary(&request, &response); |
|
|
|
|
gpr_log(GPR_INFO, "Large unary done."); |
|
|
|
|
} |
|
|
|
|