34 const std::function<
void(
ClientPacket* client_packet)>& callback) {
39 const std::function<
void(
Port client_port)>& callback) {
ServerNetworkInterface is an interface to communicates with multiple clients.
Definition server_network_interface.h:11
std::function< void(Port client_port)> disconnect_callback_
Definition server_network_interface.h:45
void RegisterClientDisconnectionCallback(const std::function< void(Port client_port)> &callback)
Definition server_network_interface.h:38
void RegisterPacketReceivedCallback(const std::function< void(ClientPacket *client_packet)> &callback)
Definition server_network_interface.h:33
std::function< void(ClientPacket *packet_data) packet_received_callback_)
Definition server_network_interface.h:44
ServerNetworkInterface() noexcept=default
virtual void SendPacket(sf::Packet *packet, Port client_id) noexcept=0
virtual void PollEvents() noexcept=0
PollEvents is a pure virtual method which must poll the network events such as client connections/dis...
ClientPacket is an object containing data that a client wishes to send to the server and its remote p...
Definition packet.h:24
std::uint16_t Port
Definition types.h:19