32 lines
No EOL
568 B
C++
32 lines
No EOL
568 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "Context.hpp"
|
|
#include "managers/ReceiveManager.hpp"
|
|
#include "managers/SendManager.hpp"
|
|
|
|
|
|
namespace drp::managers {
|
|
|
|
|
|
/**
|
|
* The Manager.
|
|
* serve as the mainloop of the program.
|
|
*/
|
|
class Manager {
|
|
public:
|
|
Manager(const std::string& address, const std::string& port, bool useIpv6 = false);
|
|
~Manager();
|
|
|
|
void loop();
|
|
|
|
private:
|
|
std::shared_ptr<Context> context; /// context used between the events types
|
|
|
|
std::unique_ptr<SendManager> sendManager;
|
|
std::unique_ptr<ReceiveManager> receiveManager;
|
|
};
|
|
|
|
|
|
} |