INetworkHandler class
Interface to handle incomming network requests.
Callback interface that a NetworkManagerBase invokes from its processing thread to report peer connections and disconnections and to deliver received packets, letting the owner accept or reject connections and react to incoming data.
Public functions
-
auto OnPeerConnected(const Peer& peer,
std::
uint32_t clientData) -> ConnectionResult pure virtual - Called when a peer connects to the local server or the local client connects to a server.
- void OnPeerDisconnected(const Peer& peer, Reason reason) pure virtual
- Called when a peer disconnects from the local server or the local client disconnects from a server.
-
void OnPacketReceived(const Peer& peer,
std::
uint8_t channelId, std:: uint8_t packetType, ArrayView<const std:: uint8_t> data) pure virtual - Called when a packet is received.