Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
ext_server.cpp File Reference
#include <grpcpp/grpcpp.h>
#include "panoptes.pb.h"
#include "panoptes.grpc.pb.h"
#include "container_ipc.hpp"
#include <objbase.h>
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

class  PanoptesImpl
 The PanoptesImpl class is a class that implements the PanoptesExtensibility::Service interface from the gRPC class. More...

Functions

void RunContainerServer (LPVOID lpParam)
 The RunContainerServer function is a function that runs the container server.

Function Documentation

◆ RunContainerServer()

void RunContainerServer ( LPVOID lpParam)

The RunContainerServer function is a function that runs the container server.

Parameters
lpParamThe port value that is read from the registry.

Definition at line 68 of file ext_server.cpp.

69{
70 int* ContainerPort = (int*)(lpParam);
71
72 PanoptesImpl service;
73 grpc::ServerBuilder builder;
74 std::string server_url = "localhost:" + std::to_string(*ContainerPort);
75 builder.AddListeningPort(server_url, grpc::InsecureServerCredentials(), ContainerPort);
76 builder.RegisterService(&service);
77 std::unique_ptr<grpc::Server> server(builder.BuildAndStart());
78 server->Wait();
79}
The PanoptesImpl class is a class that implements the PanoptesExtensibility::Service interface from t...

Referenced by WinMain().