Network code documentation for my turn-based game 1.0
Loading...
Searching...
No Matches
client_network_interface.h
Go to the documentation of this file.
1#pragma once
2
3#include "packet.h"
4
9 public:
10 ClientNetworkInterface() noexcept = default;
12 ClientNetworkInterface& operator=(ClientNetworkInterface&& other) noexcept = default;
13 ClientNetworkInterface(const ClientNetworkInterface& other) noexcept = default;
14 ClientNetworkInterface& operator=(const ClientNetworkInterface& other) noexcept = default;
15 virtual ~ClientNetworkInterface() noexcept = default;
16
17 virtual void SendPacket(sf::Packet& packet) noexcept = 0;
18 [[nodiscard]] virtual PacketType ReceivePacket(sf::Packet& packet) noexcept = 0;
19};
ClientNetworkInterface is an interface to communicates with a server.
Definition client_network_interface.h:8
ClientNetworkInterface() noexcept=default
virtual void SendPacket(sf::Packet &packet) noexcept=0
virtual PacketType ReceivePacket(sf::Packet &packet) noexcept=0
PacketType
Definition packet.h:7