5 #include <grpc++/grpc++.h>
7 #include "hashprobe.grpc.pb.h"
10 using grpc::ClientContext;
13 int main(int argc, char** argv) {
14 std::shared_ptr<Channel> channel(grpc::CreateChannel(
15 "localhost:50051", grpc::InsecureChannelCredentials()));
16 std::unique_ptr<HashProbe::Stub> stub(HashProbe::NewStub(channel));
18 HashProbeRequest request;
19 // request.set_fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
20 request.set_fen(argv[1]);
22 HashProbeResponse response;
23 ClientContext context;
24 Status status = stub->Probe(&context, request, &response);
27 std::cout << response.DebugString();
29 std::cout << "RPC failed";