FeatherMC/src/network/TCPListener.h

29 lines
450 B
C
Raw Normal View History

2020-07-25 03:01:16 +01:00
#pragma once
#include <cstdint>
#include <memory>
#include <vector>
namespace Feather::Network
{
class Protocol;
2020-07-25 03:01:16 +01:00
class TCPSocket;
class TCPListenerClient;
2020-07-25 03:01:16 +01:00
class TCPListener
{
public:
TCPListener(uint16_t port);
~TCPListener();
void DispatchQueuedPackets();
2020-07-25 03:01:16 +01:00
private:
std::unique_ptr<TCPSocket> m_socket;
std::vector<std::unique_ptr<TCPListenerClient>> m_clients;
2020-07-25 03:01:16 +01:00
};
}