|
ecsnet
|
Represents a connected network peer. More...
#include <connection_manager.h>

Public Attributes | |
| char | id [64] |
| struct sockaddr_in | addr_tcp |
| struct sockaddr_in | addr_udp |
| net_socket_t | net_sockets [PROTOCOL_COUNT] |
| bool | is_connected |
| bool | udp_ready |
| interest_mask_t | interest_mask |
| Bitmask of interest groups for this peer. | |
| uint8_t | tcp_rx_buf [MAX_PACKET_SIZE *2] |
| int | tcp_rx_len |
Represents a connected network peer.
This struct contains all the necessary information to identify and communicate with a single remote peer, including its addresses and sockets.
| struct sockaddr_in peer_t::addr_tcp |
The TCP address of the peer.
| struct sockaddr_in peer_t::addr_udp |
The UDP address of the peer.
| char peer_t::id[64] |
The unique identifier for the peer (e.g., "IP:PORT").
| interest_mask_t peer_t::interest_mask |
Bitmask of interest groups for this peer.
Each bit corresponds to a group; clients will only receive updates for entities whose NetworkedEntity.interest_groups overlap with this mask. Initialized to all bits set (0xFFFFFFFF) for maximum interest.
| bool peer_t::is_connected |
A flag indicating if the peer connection is currently active.
| net_socket_t peer_t::net_sockets[PROTOCOL_COUNT] |
Sockets used for communication with this peer.
| bool peer_t::udp_ready |
A flag indicating if the peer udp connection is ready.