6#include <SFML/Network/TcpSocket.hpp>
7#include <SFML/Network/TcpListener.hpp>
8#include <SFML/Network/SocketSelector.hpp>
32 void PollClientsConnections() noexcept;
33 void PollClientsPackets() noexcept;
34 void RemoveClient(std::unique_ptr<sf::TcpSocket>& client) noexcept;
36 std::vector<std::unique_ptr<sf::TcpSocket>> clients_{};
37 sf::SocketSelector socket_selector_{};
38 sf::TcpListener listener_{};
ServerNetworkInterface is an interface to communicates with multiple clients.
Definition server_network_interface.h:11
ServerNetworkManager is an implementation of the NetworkInterface which manages network communication...
Definition server_network_manager.h:16
void SendPacket(sf::Packet *packet, Port client_port) noexcept override
constexpr ServerNetworkManager() noexcept=default
void PollEvents() noexcept override
PollEvents is a pure virtual method which must poll the network events such as client connections/dis...
ReturnStatus ListenToPort(Port port) noexcept
std::uint16_t Port
Definition types.h:19
ReturnStatus
Definition types.h:6