To prepare for cmake + Microsoft Visual C++ compiler build
Install Visual Studio 2015 or 2017 (Visual C++ compiler will be used). Install Git. Install CMake. Install Active State Perl (choco install activeperl) - required by boringssl Install Go (choco install golang) - required by boringssl Install yasm and add it to PATH (choco install yasm) - required by boringssl (Optional) Install Ninja (choco install ninja)
// Assembles the client's payload, sends it and presents the response back // from the server. std::string SendMsg(const std::string& msg){ // Data we are sending to the server. apiService::Request request; request.set_value(msg);
// Container for the data we expect from the server. apiService::Response reply;
// Context for the client. It could be used to convey extra information to // the server and/or tweak certain RPC behaviors. ClientContext context;
// The actual RPC. Status status = stub_->apiTrans(&context, request, &reply);
// Act upon its status. if (status.ok()) { return reply.value(); } else { std::cout << status.error_code() << ": " << status.error_message() << std::endl; return""; } }