Network code documentation for my turn-based game
1.0
Loading...
Searching...
No Matches
network
include
client
client_network_interface.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
packet.h
"
4
8
class
ClientNetworkInterface
{
9
public
:
10
ClientNetworkInterface
() noexcept = default;
11
ClientNetworkInterface
(
ClientNetworkInterface
&& other) 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
ClientNetworkInterface is an interface to communicates with a server.
Definition
client_network_interface.h:8
ClientNetworkInterface::ClientNetworkInterface
ClientNetworkInterface() noexcept=default
ClientNetworkInterface::SendPacket
virtual void SendPacket(sf::Packet &packet) noexcept=0
ClientNetworkInterface::ReceivePacket
virtual PacketType ReceivePacket(sf::Packet &packet) noexcept=0
packet.h
PacketType
PacketType
Definition
packet.h:7
Generated by
1.10.0