|
ecsnet
|
Represents the client-server network architecture implementation. This struct contains the core components for a client-server setup, including the connection manager, protocol handler, and a pointer to the ECS instance. More...
#include <network_cs.h>

Public Attributes | |
| ecs_t * | ecs |
| network_architecture_config_t | config |
| connection_manager_t | connection_manager |
| protocol_handler_t | protocol_handler |
| float | sync_acc |
| network_map_t | network_map |
| uint32_t | next_network_id |
| uint32_t * | pending_destroy_ids |
| Pending destroy list for server‑side entity removal. | |
| size_t | pending_destroy_count |
| size_t | pending_destroy_capacity |
Represents the client-server network architecture implementation. This struct contains the core components for a client-server setup, including the connection manager, protocol handler, and a pointer to the ECS instance.
| network_architecture_config_t network_cs_t::config |
Configuration for this network instance.
| connection_manager_t network_cs_t::connection_manager |
The connection manager instance.
| ecs_t* network_cs_t::ecs |
A pointer to the ECS instance.
| network_map_t network_cs_t::network_map |
Mapping of remote network IDs to local entity IDs on the client. Initialized on both client and server but only used on the client side when applying network updates. On the server this remains empty.
| uint32_t network_cs_t::next_network_id |
Next network identifier to assign when the server spawns a new networked entity. Each server instance is responsible for guaranteeing uniqueness of network IDs across the lifetime of the session. Clients leave this at zero.
| uint32_t* network_cs_t::pending_destroy_ids |
Pending destroy list for server‑side entity removal.
When an entity with a NetworkedEntity component is destroyed on the server, its network_id should be queued here via network_cs_mark_entity_destroy(). During the next network tick the queued IDs will be sent to all clients as part of the delta snapshot with a zero component count, signalling clients to destroy their corresponding local entity and remove the mapping. After transmitting to all peers the list is cleared.
| protocol_handler_t network_cs_t::protocol_handler |
The protocol handler instance.
| float network_cs_t::sync_acc |
The synchronization accuracy factor.