2020-05-02 07:31:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Socket.h"
|
2020-07-04 18:43:08 +00:00
|
|
|
#include "SocketInterface.h"
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2021-03-29 20:31:24 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-05-02 07:31:03 +00:00
|
|
|
class NetworkManager
|
|
|
|
{
|
2020-07-04 18:43:08 +00:00
|
|
|
std::vector<SocketPtr> mActiveSockets;
|
2021-03-29 20:31:24 +00:00
|
|
|
ISocketInterfaceUPtr mSocketInterface;
|
2020-05-02 07:31:03 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
NetworkManager();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
~NetworkManager();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
static std::unique_ptr<NetworkManager> Create();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
void Initialize();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
void RunHttpServer();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
void ShutDown();
|
2020-05-02 07:31:03 +00:00
|
|
|
};
|
|
|
|
|
2020-07-04 18:43:08 +00:00
|
|
|
using NetworkManagerUPtr = std::unique_ptr<NetworkManager>;
|