Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
AuthSystem.hpp
Go to the documentation of this file.
1
8#ifndef RTYPE_LOGIN_SYSTEM_HPP_
9 #define RTYPE_LOGIN_SYSTEM_HPP_
10
11 #include "RType/ECS/ISystem.hpp"
12 #include "RType/ECS/Registry.hpp"
14
18
24namespace rtp::server {
25
30 class AuthSystem : public ecs::ISystem {
31 public:
37 AuthSystem(ServerNetwork& network, ecs::Registry& registry);
38
44 void update(float dt) override;
45
52 std::tuple<bool, std::string, uint8_t> handleLoginRequest(uint32_t sessionId, const net::Packet& packet);
53
59 std::pair<bool, std::string> handleRegisterRequest(uint32_t sessionId, const net::Packet& packet);
60
67 void sendLoginResponse(uint32_t sessionId, bool success, const std::string& username);
68
75 void sendRegisterResponse(uint32_t sessionId, bool success, const std::string& username);
76
77 private:
80 };
81}
82
83#endif /* !RTYPE_LOGIN_SYSTEM_HPP_ */
Interface for ECS systems.
Network packet implementation for R-Type protocol.
Abstract base class for all ECS systems.
Definition ISystem.hpp:57
Network packet with header and serializable body.
Definition Packet.hpp:471
System to handle player login operations on the server side.
ServerNetwork & _network
Reference to the server network manager.
void sendRegisterResponse(uint32_t sessionId, bool success, const std::string &username)
Send a registration response to a client.
void sendLoginResponse(uint32_t sessionId, bool success, const std::string &username)
Send a login response to a client.
std::pair< bool, std::string > handleRegisterRequest(uint32_t sessionId, const net::Packet &packet)
Handle a registration request from a client.
void update(float dt) override
Update system logic for one frame.
std::tuple< bool, std::string, uint8_t > handleLoginRequest(uint32_t sessionId, const net::Packet &packet)
Handle a login request from a client.
ecs::Registry & _registry
Reference to the entity registry.
Implementation ASIO du serveur réseau (TCP + UDP)
File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias-josue....