Systemsicherheit/Assignment 7 - SGX Hands-on/SGX101_sample_code-master/RemoteAttestation/Networking/NetworkManagerServer.cpp
Paul Zinselmeyer ba8e969470
All checks were successful
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Successful in 1m3s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Successful in 1m0s
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Successful in 30s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Successful in 10s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Successful in 8s
[Assignment-7] add SGX sample code from VM
2024-06-29 17:55:44 +02:00

33 lines
688 B
C++

#include "NetworkManagerServer.h"
NetworkManagerServer* NetworkManagerServer::instance = NULL;
NetworkManagerServer::NetworkManagerServer() {}
void NetworkManagerServer::Init() {
this->server = new Server(this->io_service, this->port);
}
NetworkManagerServer* NetworkManagerServer::getInstance(int port) {
if (instance == NULL) {
instance = new NetworkManagerServer();
instance->setPort(port);
}
return instance;
}
void NetworkManagerServer::startService() {
this->server->start_accept();
this->io_service.run();
}
void NetworkManagerServer::connectCallbackHandler(CallbackHandler cb) {
this->server->connectCallbackHandler(cb);
}