Systemsicherheit/Assignment 7 - SGX Hands-on/SGX101_sample_code-master/RemoteAttestation/Networking/Server.h
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

36 lines
779 B
C++

#ifndef SERVER_H
#define SERVER_H
#include "Session.h"
#include "LogBase.h"
#include <cstdlib>
#include <iostream>
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
class Server {
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> ssl_socket;
public:
Server(boost::asio::io_service& io_service, int port);
virtual ~Server();
std::string get_password() const;
void handle_accept(Session* new_session, const boost::system::error_code& error);
void start_accept();
void connectCallbackHandler(CallbackHandler cb);
private:
boost::asio::io_service& io_service_;
boost::asio::ip::tcp::acceptor acceptor_;
boost::asio::ssl::context context_;
CallbackHandler callback_handler;
};
#endif