stuff-from-scratch/src/network/NetworkManager.h
2020-07-04 19:43:08 +01:00

33 lines
537 B
C++

#pragma once
#include <memory>
#include <vector>
#include "Socket.h"
#include "SocketInterface.h"
class NetworkManager
{
std::vector<SocketPtr> mActiveSockets;
SocketInterfaceUPtr mSocketInterface;
public:
NetworkManager();
~NetworkManager();
static std::unique_ptr<NetworkManager> Create();
void Initialize();
void OpenSocket(SocketPtr socket);
void CloseSocket(SocketPtr socket);
void RunHttpServer();
void ShutDown();
};
using NetworkManagerUPtr = std::unique_ptr<NetworkManager>;