R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
HostNetworkEvent Struct Reference

Represents a network event (connection, disconnection, or received data). More...

#include <IHost.hpp>

Collaboration diagram for HostNetworkEvent:
Collaboration graph

Public Attributes

NetworkEventType type = NetworkEventType::NONE
 Type of the event.
 
IPeerpeer = nullptr
 Peer associated with the event.
 
std::unique_ptr< IPacketpacket
 Packet received (only for RECEIVE events).
 
uint8_t channelID = 0
 Channel on which the event occurred.
 
uint32_t data = 0
 Additional data (e.g., disconnect reason).
 

Detailed Description

Represents a network event (connection, disconnection, or received data).

Definition at line 32 of file IHost.hpp.

Member Data Documentation

◆ channelID

uint8_t HostNetworkEvent::channelID = 0

Channel on which the event occurred.

Definition at line 36 of file IHost.hpp.

Referenced by ENetHostWrapper::service().

◆ data

uint32_t HostNetworkEvent::data = 0

Additional data (e.g., disconnect reason).

Definition at line 37 of file IHost.hpp.

◆ packet

◆ peer

◆ type

NetworkEventType HostNetworkEvent::type = NetworkEventType::NONE

Type of the event.

Definition at line 33 of file IHost.hpp.

Referenced by Server::handlePacket(), and ENetHostWrapper::service().


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