Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
NetTransportConfig.h
Go to the documentation of this file.
1#ifndef BOMBERMAN_NET_NETTRANSPORTCONFIG_H
2#define BOMBERMAN_NET_NETTRANSPORTCONFIG_H
3
4#include <enet/enet.h>
5
6#include "NetCommon.h"
7
13namespace bomberman::net
14{
20 inline void applyDefaultPeerTransportConfig(ENetPeer* peer)
21 {
22 if (peer == nullptr)
23 return;
24
25 enet_peer_ping_interval(peer, kPeerPingIntervalMs);
26 enet_peer_timeout(peer,
30 }
31} // namespace bomberman::net
32
33#endif // BOMBERMAN_NET_NETTRANSPORTCONFIG_H
Shared client/server wire contract for the multiplayer protocol.
Shared multiplayer protocol types and transport-facing wire helpers.
Definition ClientPrediction.cpp:13
constexpr uint32_t kPeerTimeoutLimit
Consecutive timeout limit before ENet drops a peer.
Definition NetCommon.h:48
constexpr uint32_t kPeerPingIntervalMs
Transport heartbeat interval for connected peers.
Definition NetCommon.h:47
constexpr uint32_t kPeerTimeoutMaximumMs
Upper bound for ENet peer timeout detection.
Definition NetCommon.h:50
constexpr uint32_t kPeerTimeoutMinimumMs
Lower bound for ENet peer timeout detection.
Definition NetCommon.h:49
void applyDefaultPeerTransportConfig(ENetPeer *peer)
Applies the project's default transport-level liveness policy to one ENet peer.
Definition NetTransportConfig.h:20