vectozavr-shooter/engine/network/ReliableMsg.h

27 lines
505 B
C
Raw Normal View History

2021-09-13 15:53:43 +03:00
//
// Created by Neirokan on 30.04.2020
//
#ifndef ENGINE_RELIABLEMSG_H
#define ENGINE_RELIABLEMSG_H
#include <SFML/Network.hpp>
2021-10-28 16:58:02 +03:00
class ReliableMsg final {
2021-09-13 15:53:43 +03:00
private:
sf::Packet packet;
2021-10-28 16:58:02 +03:00
const sf::IpAddress address;
const sf::Uint16 port;
const double firstTry;
2021-09-13 15:53:43 +03:00
double lastTry;
public:
ReliableMsg(sf::Packet& packet, sf::IpAddress address, sf::Uint16 port);
ReliableMsg(const ReliableMsg& msg);
bool trySend(sf::UdpSocket& socket);
};
#endif //INC_3DZAVR_RELIABLEMSG_H