ecsnet
Loading...
Searching...
No Matches
peer_t Struct Reference

Represents a connected network peer. More...

#include <connection_manager.h>

Collaboration diagram for peer_t:

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

Detailed Description

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.

Member Data Documentation

◆ addr_tcp

struct sockaddr_in peer_t::addr_tcp

The TCP address of the peer.

◆ addr_udp

struct sockaddr_in peer_t::addr_udp

The UDP address of the peer.

◆ id

char peer_t::id[64]

The unique identifier for the peer (e.g., "IP:PORT").

◆ interest_mask

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.

◆ is_connected

bool peer_t::is_connected

A flag indicating if the peer connection is currently active.

◆ net_sockets

net_socket_t peer_t::net_sockets[PROTOCOL_COUNT]

Sockets used for communication with this peer.

◆ udp_ready

bool peer_t::udp_ready

A flag indicating if the peer udp connection is ready.


The documentation for this struct was generated from the following file: