29 lines
450 B
C++
29 lines
450 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace Feather::Network
|
|
{
|
|
class Protocol;
|
|
|
|
class TCPSocket;
|
|
class TCPListenerClient;
|
|
|
|
class TCPListener
|
|
{
|
|
public:
|
|
TCPListener(uint16_t port);
|
|
~TCPListener();
|
|
|
|
void DispatchQueuedPackets();
|
|
|
|
private:
|
|
std::unique_ptr<TCPSocket> m_socket;
|
|
|
|
std::vector<std::unique_ptr<TCPListenerClient>> m_clients;
|
|
};
|
|
|
|
|
|
} |