#include <grpc.hpp>
Definition at line 5 of file grpc.hpp.
◆ PanoptesContainerClient() [1/2]
| PanoptesContainerClient::PanoptesContainerClient |
( |
int | ContainerPort | ) |
|
Definition at line 210 of file grpc.cpp.
210 {
211 std::string server_url = "localhost:" + std::to_string(containerPort);
212 std::shared_ptr<grpc::Channel> channel = grpc::CreateChannel(server_url, grpc::InsecureChannelCredentials());
213 stub_ = PanoptesExtensibility::NewStub(channel);
214}
std::unique_ptr< PanoptesService::Stub > stub_
References stub_.
◆ PanoptesContainerClient() [2/2]
| PanoptesContainerClient::PanoptesContainerClient |
( |
int | ContainerPort | ) |
|
◆ SendPeScanRequest() [1/2]
| bool PanoptesContainerClient::SendPeScanRequest |
( |
std::string | PePath, |
|
|
std::string | FileHash ) |
Definition at line 216 of file grpc.cpp.
216 {
217 AckMessage reply;
218 ClientContext context;
219
220 PeScanInfo request;
221 request.set_file_hash(fileHash);
222 request.set_portable_executable_path(pePath);
223
224 Status status =
stub_->PEScan(&context, request, &reply);
225 if (!status.ok()) {
226 std::cout << status.error_code() << ": " << status.error_message() << std::endl;
227 }
228
229 return reply.ack_type();
230}
References stub_.
◆ SendPeScanRequest() [2/2]
| bool PanoptesContainerClient::SendPeScanRequest |
( |
std::string | PePath, |
|
|
std::string | FileHash ) |
The documentation for this class was generated from the following files:
- /home/runner/work/Panoptes/Panoptes/src/service/include/grpc.hpp
- /home/runner/work/Panoptes/Panoptes/src/service/include/service_ipc.h
- /home/runner/work/Panoptes/Panoptes/src/service/src/grpc.cpp