stuff-from-scratch/src/network/NetworkManager.h
2020-05-02 08:31:03 +01:00

33 lines
513 B
C++

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