Network code documentation for my turn-based game 1.0
Loading...
Searching...
No Matches
packet.h
Go to the documentation of this file.
1#pragma once
2
3#include "types.h"
4
5#include <SFML/Network/Packet.hpp>
6
7enum class PacketType : std::int8_t {
8 kNone = 0,
17};
18
25 sf::Packet data{};
27};
28
29sf::Packet& operator<<(sf::Packet& packet, const PacketType& type);
30sf::Packet& operator>>(sf::Packet& packet, PacketType& type);
sf::Packet & operator<<(sf::Packet &packet, const PacketType &type)
sf::Packet & operator>>(sf::Packet &packet, PacketType &type)
PacketType
Definition packet.h:7
@ kClientIdentification
ClientPacket is an object containing data that a client wishes to send to the server and its remote p...
Definition packet.h:24
sf::Packet data
Definition packet.h:25
Port client_port
Definition packet.h:26
std::uint16_t Port
Definition types.h:19