8#ifndef RTYPE_NETWORK_NetworkSyncSystem_HPP_
9 #define RTYPE_NETWORK_NetworkSyncSystem_HPP_
23 #include <unordered_map>
49 void update(
float dt)
override;
106 std::unordered_map<uint32_t,
Interface for ECS systems.
Network packet implementation for R-Type protocol.
Represents an entity in the ECS (Entity-Component-System) architecture.
Abstract base class for all ECS systems.
Network packet with header and serializable body.
System to handle network-related operations on the server side.
void handleDisconnect(uint32_t sessionId)
Handle disconnection of a client.
void sendPacketToSessions(const std::vector< uint32_t > &sessions, const net::Packet &packet, net::NetworkMode mode)
Send a packet to multiple sessions.
ServerNetwork & _network
Reference to the server network manager.
uint32_t handlePlayerConnection(uint32_t sessionId, const net::Packet &packet)
Handle new player connection.
void handleInput(uint32_t sessionId, const net::Packet &packet)
Handle input received from a client.
ecs::Registry & _registry
Reference to the entity registry.
void sendPacketToSession(uint32_t sessionId, const net::Packet &packet, net::NetworkMode mode)
Send a packet to a specific session.
std::unordered_map< uint32_t, ecs::Entity > _sessionToEntity
Map of session IDs to entities (with generation)
void update(float dt) override
Update system logic for one frame.
void sendPacketToEntity(uint32_t entityId, const net::Packet &packet, net::NetworkMode mode)
Send a packet to the entity associated with the given ID.
void unbindSession(uint32_t sessionId)
void bindSessionToEntity(uint32_t sessionId, ecs::Entity entity)
Bind a network session to an entity.
Implementation ASIO du serveur réseau (TCP + UDP)
NetworkMode
Enum representing network transmission modes.
File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias-josue....