bool uploadDetectionRPC(const FrameData &frame_data, const std::string &server, const std::string &secret) {
auto options = grpc::SslCredentialsOptions();
auto channel_creds = grpc::SslCredentials(options);
auto call_creds = grpc::MetadataCredentialsFromPlugin(
std::unique_ptr<grpc::MetadataCredentialsPlugin>(new Authenticator(secret)));
auto composite_creds = grpc::CompositeChannelCredentials(channel_creds, call_creds);
IngestionServiceClient ingestion_client(grpc::CreateChannel(server, composite_creds));
bool res = ingestion_client.RecordDetection(frame_data);
return res;
}
Having some issues with this code sending data thgrough AWS ELB instance to server. It works with Go can my client can send correctly to the sever but when I try to implement in CPP I start getting this ALPN property issue.
E0724 14:16:01.337537569 22655 security_connector.c:529] Missing selected ALPN property.
E0724 14:16:01.337593585 22655 handshake.c:128] Security handshake failed: {"created":"@1500930961.337578768","description":"Error checking peer.","file":"external/com_github_grpc_grpc/src/core/lib/security/transport/handshake.c","file_line":152,"security_status":1}